1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add golangci (#6418)

This commit is contained in:
kolaente
2019-06-12 21:41:28 +02:00
committed by techknowlogick
parent 5832f8d90d
commit f9ec2f89f2
147 changed files with 1046 additions and 774 deletions

View File

@@ -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:]
}