mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-05 00:06:29 +00:00
Run gopls modernize
on codebase (#34751)
Recent modernize fixes: https://github.com/golang/tools/commits/master/gopls/internal/analysis/modernize
This commit is contained in:
@@ -26,10 +26,7 @@ func Notices(ctx *context.Context) {
|
||||
ctx.Data["PageIsAdminNotices"] = true
|
||||
|
||||
total := system_model.CountNotices(ctx)
|
||||
page := ctx.FormInt("page")
|
||||
if page <= 1 {
|
||||
page = 1
|
||||
}
|
||||
page := max(ctx.FormInt("page"), 1)
|
||||
|
||||
notices, err := system_model.Notices(ctx, page, setting.UI.Admin.NoticePagingNum)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user