aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.com>2024-02-14 13:19:57 -0500
committerGitHub <noreply@github.com>2024-02-14 18:19:57 +0000
commita346a8c852a44c9c22eeb06701a384bb17a7ac0b (patch)
treecf6b9973e8ba8e55588f15f99bf649635036e1ce /routers/web
parent155269fa586c41a268530c3bb56349e68e6761d7 (diff)
downloadgitea-a346a8c852a44c9c22eeb06701a384bb17a7ac0b.tar.gz
gitea-a346a8c852a44c9c22eeb06701a384bb17a7ac0b.zip
bump to use go 1.22 (#29119)
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/org/projects.go8
-rw-r--r--routers/web/repo/projects.go8
-rw-r--r--routers/web/user/home.go8
3 files changed, 12 insertions, 12 deletions
diff --git a/routers/web/org/projects.go b/routers/web/org/projects.go
index 03798a712c..f65cc6e679 100644
--- a/routers/web/org/projects.go
+++ b/routers/web/org/projects.go
@@ -377,16 +377,16 @@ func ViewProject(ctx *context.Context) {
linkedPrsMap := make(map[int64][]*issues_model.Issue)
for _, issuesList := range issuesMap {
for _, issue := range issuesList {
- var referencedIds []int64
+ var referencedIDs []int64
for _, comment := range issue.Comments {
if comment.RefIssueID != 0 && comment.RefIsPull {
- referencedIds = append(referencedIds, comment.RefIssueID)
+ referencedIDs = append(referencedIDs, comment.RefIssueID)
}
}
- if len(referencedIds) > 0 {
+ if len(referencedIDs) > 0 {
if linkedPrs, err := issues_model.Issues(ctx, &issues_model.IssuesOptions{
- IssueIDs: referencedIds,
+ IssueIDs: referencedIDs,
IsPull: util.OptionalBoolTrue,
}); err == nil {
linkedPrsMap[issue.ID] = linkedPrs
diff --git a/routers/web/repo/projects.go b/routers/web/repo/projects.go
index 4908bb796d..001f0752c3 100644
--- a/routers/web/repo/projects.go
+++ b/routers/web/repo/projects.go
@@ -339,16 +339,16 @@ func ViewProject(ctx *context.Context) {
linkedPrsMap := make(map[int64][]*issues_model.Issue)
for _, issuesList := range issuesMap {
for _, issue := range issuesList {
- var referencedIds []int64
+ var referencedIDs []int64
for _, comment := range issue.Comments {
if comment.RefIssueID != 0 && comment.RefIsPull {
- referencedIds = append(referencedIds, comment.RefIssueID)
+ referencedIDs = append(referencedIDs, comment.RefIssueID)
}
}
- if len(referencedIds) > 0 {
+ if len(referencedIDs) > 0 {
if linkedPrs, err := issues_model.Issues(ctx, &issues_model.IssuesOptions{
- IssueIDs: referencedIds,
+ IssueIDs: referencedIDs,
IsPull: util.OptionalBoolTrue,
}); err == nil {
linkedPrsMap[issue.ID] = linkedPrs
diff --git a/routers/web/user/home.go b/routers/web/user/home.go
index 44920817c9..83fc4d7162 100644
--- a/routers/web/user/home.go
+++ b/routers/web/user/home.go
@@ -296,17 +296,17 @@ func Milestones(ctx *context.Context) {
}
}
- showRepoIds := make(container.Set[int64], len(showRepos))
+ showRepoIDs := make(container.Set[int64], len(showRepos))
for _, repo := range showRepos {
if repo.ID > 0 {
- showRepoIds.Add(repo.ID)
+ showRepoIDs.Add(repo.ID)
}
}
if len(repoIDs) == 0 {
- repoIDs = showRepoIds.Values()
+ repoIDs = showRepoIDs.Values()
}
repoIDs = slices.DeleteFunc(repoIDs, func(v int64) bool {
- return !showRepoIds.Contains(v)
+ return !showRepoIDs.Contains(v)
})
var pagerCount int