aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-12-15 03:31:07 +0100
committerGitHub <noreply@github.com>2024-12-15 02:31:07 +0000
commit1cfb718976e2db517da0e76bda835edd9df1fabd (patch)
tree556f0e895ce6d6f35d57266ea9c51e68c7f89ce6 /routers
parent7616aeb2ea2a02c15480dcd4a232e98081569690 (diff)
downloadgitea-1cfb718976e2db517da0e76bda835edd9df1fabd.tar.gz
gitea-1cfb718976e2db517da0e76bda835edd9df1fabd.zip
Update golangci-lint to v1.62.2, fix issues (#32845)
Update it and fix new issues related to `redefines-builtin-id`
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/repo/issue_dependency.go4
-rw-r--r--routers/api/v1/repo/wiki.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/routers/api/v1/repo/issue_dependency.go b/routers/api/v1/repo/issue_dependency.go
index 712c71a682..ae7502c661 100644
--- a/routers/api/v1/repo/issue_dependency.go
+++ b/routers/api/v1/repo/issue_dependency.go
@@ -338,7 +338,7 @@ func GetIssueBlocks(ctx *context.APIContext) {
}
skip := (page - 1) * limit
- max := page * limit
+ maxNum := page * limit
deps, err := issue.BlockingDependencies(ctx)
if err != nil {
@@ -352,7 +352,7 @@ func GetIssueBlocks(ctx *context.APIContext) {
repoPerms[ctx.Repo.Repository.ID] = ctx.Repo.Permission
for i, depMeta := range deps {
- if i < skip || i >= max {
+ if i < skip || i >= maxNum {
continue
}
diff --git a/routers/api/v1/repo/wiki.go b/routers/api/v1/repo/wiki.go
index c7065c1d9d..f9906ed250 100644
--- a/routers/api/v1/repo/wiki.go
+++ b/routers/api/v1/repo/wiki.go
@@ -308,7 +308,7 @@ func ListWikiPages(ctx *context.APIContext) {
}
skip := (page - 1) * limit
- max := page * limit
+ maxNum := page * limit
entries, err := commit.ListEntries()
if err != nil {
@@ -317,7 +317,7 @@ func ListWikiPages(ctx *context.APIContext) {
}
pages := make([]*api.WikiPageMetaData, 0, len(entries))
for i, entry := range entries {
- if i < skip || i >= max || !entry.IsRegular() {
+ if i < skip || i >= maxNum || !entry.IsRegular() {
continue
}
c, err := wikiRepo.GetCommitByPath(entry.Name())