fix(vet): Range var used by goroutine

* Use it as a paramater for the closure
This commit is contained in:
Sergio Jimenez 2016-02-11 01:18:53 +01:00
parent 3cc2cda026
commit 3573d93855
1 changed files with 3 additions and 3 deletions

View File

@ -62,11 +62,11 @@ func (m *Mesos) Gather(acc telegraf.Accumulator) error {
for _, v := range m.Masters {
wg.Add(1)
go func() {
errorChannel <- m.gatherMetrics(v, acc)
go func(c string) {
errorChannel <- m.gatherMetrics(c, acc)
wg.Done()
return
}()
}(v)
}
wg.Wait()