diff options
author | Joe Chen <jc@unknwon.io> | 2022-05-16 20:57:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 20:57:19 +0800 |
commit | c4b770f3053a8a9794c5916281fc0517a590b0fa (patch) | |
tree | f4659fa65def34d75c925709b2aa860c98b8870d /internal/db | |
parent | a6c53eb0683b4daf85e800193fd363826d02f10c (diff) |
chore: fix lint errors (#6951)
Diffstat (limited to 'internal/db')
-rw-r--r-- | internal/db/issue.go | 4 |
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) |