aboutsummaryrefslogtreecommitdiff
path: root/internal/db
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-05-16 20:57:19 +0800
committerGitHub <noreply@github.com>2022-05-16 20:57:19 +0800
commitc4b770f3053a8a9794c5916281fc0517a590b0fa (patch)
treef4659fa65def34d75c925709b2aa860c98b8870d /internal/db
parenta6c53eb0683b4daf85e800193fd363826d02f10c (diff)
chore: fix lint errors (#6951)
Diffstat (limited to 'internal/db')
-rw-r--r--internal/db/issue.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/internal/db/issue.go b/internal/db/issue.go
index fdcabf9b..9fafd4f0 100644
--- a/internal/db/issue.go
+++ b/internal/db/issue.go
@@ -315,9 +315,7 @@ func (issue *Issue) clearLabels(e *xorm.Session) (err error) {
// NOTE: issue.removeLabel slices issue.Labels, so we need to create another slice to be unaffected.
labels := make([]*Label, len(issue.Labels))
- for i := range issue.Labels {
- labels[i] = issue.Labels[i]
- }
+ copy(labels, issue.Labels)
for i := range labels {
if err = issue.removeLabel(e, labels[i]); err != nil {
return fmt.Errorf("removeLabel: %v", err)