aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue_label.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-12 16:29:18 +0800
committerThibault Meyer <0xbaadf00d@users.noreply.github.com>2016-11-12 09:29:18 +0100
commit30a37311f85b3058c8c5b94427208281568eba91 (patch)
treee70d1f01f0e97fb9cb5a4f79b96a65185f1ae7f7 /models/issue_label.go
parent555d8b16cb8670dd0a4e9094d26091eba6a6df36 (diff)
downloadgitea-30a37311f85b3058c8c5b94427208281568eba91.tar.gz
gitea-30a37311f85b3058c8c5b94427208281568eba91.zip
use in instead string join (#155)
Diffstat (limited to 'models/issue_label.go')
-rw-r--r--models/issue_label.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/models/issue_label.go b/models/issue_label.go
index a42219d888..3eed8ed985 100644
--- a/models/issue_label.go
+++ b/models/issue_label.go
@@ -14,8 +14,6 @@ import (
"github.com/go-xorm/xorm"
api "code.gitea.io/sdk/gitea"
-
- "code.gitea.io/gitea/modules/base"
)
var labelColorPattern = regexp.MustCompile("#([a-fA-F0-9]{6})")
@@ -140,7 +138,7 @@ func GetLabelsInRepoByIDs(repoID int64, labelIDs []int64) ([]*Label, error) {
labels := make([]*Label, 0, len(labelIDs))
return labels, x.
Where("repo_id = ?", repoID).
- In("id", base.Int64sToStrings(labelIDs)).
+ In("id", labelIDs).
Asc("name").
Find(&labels)
}
@@ -170,7 +168,7 @@ func getLabelsByIssueID(e Engine, issueID int64) ([]*Label, error) {
labels := make([]*Label, 0, len(labelIDs))
return labels, e.
Where("id > 0").
- In("id", base.Int64sToStrings(labelIDs)).
+ In("id", labelIDs).
Asc("name").
Find(&labels)
}