From 681e6951704b8292a03ca37736871217797e0e79 Mon Sep 17 00:00:00 2001 From: Vebjorn Ljosa Date: Wed, 16 Mar 2016 17:52:38 -0400 Subject: [PATCH] Don't copy lock when `range`ing over map Make `go vet` happy. --- plugins/inputs/couchbase/couchbase.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/inputs/couchbase/couchbase.go b/plugins/inputs/couchbase/couchbase.go index 2a3e687ea..aff551b2e 100644 --- a/plugins/inputs/couchbase/couchbase.go +++ b/plugins/inputs/couchbase/couchbase.go @@ -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) }