fix golint issues

This commit is contained in:
Tan Jiang 2016-06-20 13:04:27 +08:00
parent bc5d71ee86
commit f6a9f67613
2 changed files with 3 additions and 3 deletions

View File

@ -1164,7 +1164,7 @@ func TestGetRepoJobToStop(t *testing.T) {
} }
var err error var err error
var i int64 var i int64
ids := make([]int64, 0) var ids []int64
for _, j := range jobs { for _, j := range jobs {
i, err = AddRepJob(j) i, err = AddRepJob(j)
ids = append(ids, i) ids = append(ids, i)

View File

@ -351,10 +351,10 @@ func ResetRunningJobs() error {
return err return err
} }
// GetRepJobsByStatus get jobs of certain statuses // GetRepJobByStatus get jobs of certain statuses
func GetRepJobByStatus(status ...string) ([]*models.RepJob, error) { func GetRepJobByStatus(status ...string) ([]*models.RepJob, error) {
var res []*models.RepJob var res []*models.RepJob
t := make([]interface{}, 0) var t []interface{}
for _, s := range status { for _, s := range status {
t = append(t, interface{}(s)) t = append(t, interface{}(s))
} }