diff options
author | silverwind <me@silverwind.io> | 2024-12-15 03:31:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-15 02:31:07 +0000 |
commit | 1cfb718976e2db517da0e76bda835edd9df1fabd (patch) | |
tree | 556f0e895ce6d6f35d57266ea9c51e68c7f89ce6 /models | |
parent | 7616aeb2ea2a02c15480dcd4a232e98081569690 (diff) | |
download | gitea-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 'models')
-rw-r--r-- | models/issues/issue_index.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/issues/issue_index.go b/models/issues/issue_index.go index 16274d0ef0..2eb61858bf 100644 --- a/models/issues/issue_index.go +++ b/models/issues/issue_index.go @@ -18,12 +18,12 @@ func RecalculateIssueIndexForRepo(ctx context.Context, repoID int64) error { } defer committer.Close() - var max int64 - if _, err = db.GetEngine(ctx).Select(" MAX(`index`)").Table("issue").Where("repo_id=?", repoID).Get(&max); err != nil { + var maxIndex int64 + if _, err = db.GetEngine(ctx).Select(" MAX(`index`)").Table("issue").Where("repo_id=?", repoID).Get(&maxIndex); err != nil { return err } - if err = db.SyncMaxResourceIndex(ctx, "issue_index", repoID, max); err != nil { + if err = db.SyncMaxResourceIndex(ctx, "issue_index", repoID, maxIndex); err != nil { return err } |