mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-12 20:23:52 +08:00
golangci-lint run
This commit is contained in:
@@ -31,13 +31,8 @@ func (c *cDept) Edit(ctx context.Context, req *dept.EditReq) (res *dept.EditRes,
|
||||
|
||||
// MaxSort 最大排序
|
||||
func (c *cDept) MaxSort(ctx context.Context, req *dept.MaxSortReq) (res *dept.MaxSortRes, err error) {
|
||||
data, err := service.AdminDept().MaxSort(ctx, &req.DeptMaxSortInp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = new(dept.MaxSortRes)
|
||||
res.Sort = data.Sort
|
||||
res.DeptMaxSortModel, err = service.AdminDept().MaxSort(ctx, &req.DeptMaxSortInp)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -32,13 +32,8 @@ func (c *cNotice) Edit(ctx context.Context, req *notice.EditReq) (res *notice.Ed
|
||||
|
||||
// MaxSort 最大排序
|
||||
func (c *cNotice) MaxSort(ctx context.Context, req *notice.MaxSortReq) (res *notice.MaxSortRes, err error) {
|
||||
data, err := service.AdminNotice().MaxSort(ctx, &req.NoticeMaxSortInp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = new(notice.MaxSortRes)
|
||||
res.Sort = data.Sort
|
||||
res.NoticeMaxSortModel, err = service.AdminNotice().MaxSort(ctx, &req.NoticeMaxSortInp)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -30,13 +30,8 @@ func (c *cPost) Edit(ctx context.Context, req *post.EditReq) (res *post.EditRes,
|
||||
|
||||
// MaxSort 最大排序
|
||||
func (c *cPost) MaxSort(ctx context.Context, req *post.MaxSortReq) (res *post.MaxSortRes, err error) {
|
||||
data, err := service.AdminPost().MaxSort(ctx, &req.PostMaxSortInp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = new(post.MaxSortRes)
|
||||
res.Sort = data.Sort
|
||||
res.PostMaxSortModel, err = service.AdminPost().MaxSort(ctx, &req.PostMaxSortInp)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -33,13 +33,8 @@ func (c *cCron) Edit(ctx context.Context, req *cron.EditReq) (res *cron.EditRes,
|
||||
|
||||
// MaxSort 最大排序
|
||||
func (c *cCron) MaxSort(ctx context.Context, req *cron.MaxSortReq) (res *cron.MaxSortRes, err error) {
|
||||
data, err := service.SysCron().MaxSort(ctx, &req.CronMaxSortInp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = new(cron.MaxSortRes)
|
||||
res.Sort = data.Sort
|
||||
res.CronMaxSortModel, err = service.SysCron().MaxSort(ctx, &req.CronMaxSortInp)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -31,13 +31,8 @@ func (c *cCronGroup) Edit(ctx context.Context, req *cron.GroupEditReq) (res *cro
|
||||
|
||||
// MaxSort 最大排序
|
||||
func (c *cCronGroup) MaxSort(ctx context.Context, req *cron.GroupMaxSortReq) (res *cron.GroupMaxSortRes, err error) {
|
||||
data, err := service.SysCronGroup().MaxSort(ctx, &req.CronGroupMaxSortInp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = new(cron.GroupMaxSortRes)
|
||||
res.Sort = data.Sort
|
||||
res.CronGroupMaxSortModel, err = service.SysCronGroup().MaxSort(ctx, &req.CronGroupMaxSortInp)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -37,13 +37,8 @@ func (c *cGenCodes) Edit(ctx context.Context, req *gencodes.EditReq) (res *genco
|
||||
|
||||
// MaxSort 最大排序
|
||||
func (c *cGenCodes) MaxSort(ctx context.Context, req *gencodes.MaxSortReq) (res *gencodes.MaxSortRes, err error) {
|
||||
data, err := service.SysGenCodes().MaxSort(ctx, &req.GenCodesMaxSortInp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = new(gencodes.MaxSortRes)
|
||||
res.Sort = data.Sort
|
||||
res.GenCodesMaxSortModel, err = service.SysGenCodes().MaxSort(ctx, &req.GenCodesMaxSortInp)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ func (a *cSite) Index(ctx context.Context, _ *base.SiteIndexReq) (res *base.Site
|
||||
"version": consts.VersionApp,
|
||||
}})
|
||||
|
||||
//err = gerror.New("这是一个测试错误")
|
||||
//return
|
||||
// err = gerror.New("这是一个测试错误")
|
||||
// return
|
||||
|
||||
//err = gerror.NewCode(gcode.New(10000, "这是一个测试自定义错误码错误", nil))
|
||||
//return
|
||||
// err = gerror.NewCode(gcode.New(10000, "这是一个测试自定义错误码错误", nil))
|
||||
// return
|
||||
|
||||
//service.View().Error(ctx, gerror.New("这是一个允许被自定义格式的错误,默认和通用错误格式一致,你可以修改它"))
|
||||
//return
|
||||
// service.View().Error(ctx, gerror.New("这是一个允许被自定义格式的错误,默认和通用错误格式一致,你可以修改它"))
|
||||
// return
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user