Fix unused it var
@@ -62,9 +62,10 @@ func (q *Queue) Init(names []string, when time.Time) {
for _, name := range names {
found[name] = true
- it, ok := items[name]
- if !ok {
- it = &item{
+ if _, ok := items[name]; ok {
+ continue
+ }
+ it := &item{
name: name,
when: when,
index: len(q.queue),
@@ -76,7 +77,6 @@ func (q *Queue) Init(names []string, when time.Time) {
"name": name,
}).Info("Adding name to queue")
}
- }
for name, it := range items {
if found[name] {
