chore: golang lint

This commit is contained in:
Jason Song
2022-11-26 22:12:52 +08:00
parent bfe0fc1533
commit ef4b3673dd
10 changed files with 15 additions and 16 deletions

View File

@ -16,14 +16,14 @@ import (
type TaskList []*Task
func (tasks TaskList) GetJobIDs() []int64 {
var jobIDsMap = make(map[int64]struct{})
jobIDsMap := make(map[int64]struct{})
for _, t := range tasks {
if t.JobID == 0 {
continue
}
jobIDsMap[t.JobID] = struct{}{}
}
var jobIDs = make([]int64, 0, len(jobIDsMap))
jobIDs := make([]int64, 0, len(jobIDsMap))
for jobID := range jobIDsMap {
jobIDs = append(jobIDs, jobID)
}