aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue_comment_list.go
diff options
context:
space:
mode:
authorkolaente <konrad@kola-entertainments.de>2019-06-12 21:41:28 +0200
committertechknowlogick <techknowlogick@gitea.io>2019-06-12 15:41:28 -0400
commitf9ec2f89f2265bc1371a6c62359de9816534fa6b (patch)
treef48b138a457e5ac6cf843bbb38400926704370f7 /models/issue_comment_list.go
parent5832f8d90df2d72cb38698c3e9050f2b29717dc7 (diff)
downloadgitea-f9ec2f89f2265bc1371a6c62359de9816534fa6b.tar.gz
gitea-f9ec2f89f2265bc1371a6c62359de9816534fa6b.zip
Add golangci (#6418)
Diffstat (limited to 'models/issue_comment_list.go')
-rw-r--r--models/issue_comment_list.go38
1 files changed, 19 insertions, 19 deletions
diff --git a/models/issue_comment_list.go b/models/issue_comment_list.go
index a8c8123280..ae2a89a01a 100644
--- a/models/issue_comment_list.go
+++ b/models/issue_comment_list.go
@@ -36,7 +36,7 @@ func (comments CommentList) loadPosters(e Engine) error {
if err != nil {
return err
}
- left = left - limit
+ left -= limit
posterIDs = posterIDs[limit:]
}
@@ -94,13 +94,13 @@ func (comments CommentList) loadLabels(e Engine) error {
var label Label
err = rows.Scan(&label)
if err != nil {
- rows.Close()
+ _ = rows.Close()
return err
}
commentLabels[label.ID] = &label
}
- rows.Close()
- left = left - limit
+ _ = rows.Close()
+ left -= limit
labelIDs = labelIDs[limit:]
}
@@ -143,7 +143,7 @@ func (comments CommentList) loadMilestones(e Engine) error {
if err != nil {
return err
}
- left = left - limit
+ left -= limit
milestoneIDs = milestoneIDs[limit:]
}
@@ -186,7 +186,7 @@ func (comments CommentList) loadOldMilestones(e Engine) error {
if err != nil {
return err
}
- left = left - limit
+ left -= limit
milestoneIDs = milestoneIDs[limit:]
}
@@ -236,9 +236,9 @@ func (comments CommentList) loadAssignees(e Engine) error {
assignees[user.ID] = &user
}
- rows.Close()
+ _ = rows.Close()
- left = left - limit
+ left -= limit
assigneeIDs = assigneeIDs[limit:]
}
@@ -310,9 +310,9 @@ func (comments CommentList) loadIssues(e Engine) error {
issues[issue.ID] = &issue
}
- rows.Close()
+ _ = rows.Close()
- left = left - limit
+ left -= limit
issueIDs = issueIDs[limit:]
}
@@ -361,15 +361,15 @@ func (comments CommentList) loadDependentIssues(e Engine) error {
var issue Issue
err = rows.Scan(&issue)
if err != nil {
- rows.Close()
+ _ = rows.Close()
return err
}
issues[issue.ID] = &issue
}
- rows.Close()
+ _ = rows.Close()
- left = left - limit
+ left -= limit
issueIDs = issueIDs[limit:]
}
@@ -406,14 +406,14 @@ func (comments CommentList) loadAttachments(e Engine) (err error) {
var attachment Attachment
err = rows.Scan(&attachment)
if err != nil {
- rows.Close()
+ _ = rows.Close()
return err
}
attachments[attachment.CommentID] = append(attachments[attachment.CommentID], &attachment)
}
- rows.Close()
- left = left - limit
+ _ = rows.Close()
+ left -= limit
commentsIDs = commentsIDs[limit:]
}
@@ -457,15 +457,15 @@ func (comments CommentList) loadReviews(e Engine) error {
var review Review
err = rows.Scan(&review)
if err != nil {
- rows.Close()
+ _ = rows.Close()
return err
}
reviews[review.ID] = &review
}
- rows.Close()
+ _ = rows.Close()
- left = left - limit
+ left -= limit
reviewIDs = reviewIDs[limit:]
}