Don't copy lock when `range`ing over map

Make `go vet` happy.
This commit is contained in:
Vebjorn Ljosa 2016-03-16 17:52:38 -04:00 committed by Cameron Sparr
parent a043664dc4
commit 681e695170
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ func (r *Couchbase) gatherServer(addr string, acc telegraf.Accumulator) error {
fields["memory_total"] = node.MemoryTotal
acc.AddFields("couchbase_node", fields, tags)
}
for bucketName, bucket := range pool.BucketMap {
for bucketName, _ := range pool.BucketMap {
bucket := pool.BucketMap[bucketName]
tags := map[string]string{"cluster": addr, "bucket": bucketName}
acc.AddFields("couchbase_bucket", bucket.BasicStats, tags)
}