mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-04 15:56:28 +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:
@@ -197,7 +197,7 @@ func Milestones(ctx *context.Context) {
|
||||
reposQuery = reposQuery[1 : len(reposQuery)-1]
|
||||
// for each ID (delimiter ",") add to int to repoIDs
|
||||
|
||||
for _, rID := range strings.Split(reposQuery, ",") {
|
||||
for rID := range strings.SplitSeq(reposQuery, ",") {
|
||||
// Ensure nonempty string entries
|
||||
if rID != "" && rID != "0" {
|
||||
rIDint64, err := strconv.ParseInt(rID, 10, 64)
|
||||
@@ -520,10 +520,7 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
|
||||
opts.IsClosed = optional.Some(isShowClosed)
|
||||
|
||||
// Make sure page number is at least 1. Will be posted to ctx.Data.
|
||||
page := ctx.FormInt("page")
|
||||
if page <= 1 {
|
||||
page = 1
|
||||
}
|
||||
page := max(ctx.FormInt("page"), 1)
|
||||
opts.Paginator = &db.ListOptions{
|
||||
Page: page,
|
||||
PageSize: setting.UI.IssuePagingNum,
|
||||
|
Reference in New Issue
Block a user