diff --git a/coordinator/points_writer_test.go b/coordinator/points_writer_test.go index 83bab401b1..fef088f35a 100644 --- a/coordinator/points_writer_test.go +++ b/coordinator/points_writer_test.go @@ -523,7 +523,7 @@ func TestBufferedPointsWriter(t *testing.T) { reset() // Test writing points one at a time. - for i, _ := range r.Points { + for i := range r.Points { if err := w.WritePointsInto(&coordinator.IntoWriteRequest{ Database: db, RetentionPolicy: rp, diff --git a/services/meta/data.go b/services/meta/data.go index d0d1b9f2dd..14c39d66b6 100644 --- a/services/meta/data.go +++ b/services/meta/data.go @@ -871,7 +871,7 @@ func (data *Data) importOneDB(other Data, backupDBName, restoreDBName, backupRPN for j, sgImport := range rpImport.ShardGroups { data.MaxShardGroupID++ rpImport.ShardGroups[j].ID = data.MaxShardGroupID - for k, _ := range sgImport.Shards { + for k := range sgImport.Shards { data.MaxShardID++ shardIDMap[sgImport.Shards[k].ID] = data.MaxShardID sgImport.Shards[k].ID = data.MaxShardID diff --git a/tsdb/engine/tsm1/engine_test.go b/tsdb/engine/tsm1/engine_test.go index 379cbe5de6..ad5cddc2a2 100644 --- a/tsdb/engine/tsm1/engine_test.go +++ b/tsdb/engine/tsm1/engine_test.go @@ -394,14 +394,14 @@ func TestEngine_Export(t *testing.T) { } // TEST 1: did we get any extra files not found in the store? - for k, _ := range fileData { + for k := range fileData { if _, ok := fileNames[k]; !ok { t.Errorf("exported a file not in the store: %s", k) } } // TEST 2: did we miss any files that the store had? - for k, _ := range fileNames { + for k := range fileNames { if _, ok := fileData[k]; !ok { t.Errorf("failed to export a file from the store: %s", k) } diff --git a/tsdb/store.go b/tsdb/store.go index 28e32dd5cf..da31938e1a 100644 --- a/tsdb/store.go +++ b/tsdb/store.go @@ -930,7 +930,7 @@ func (s *Store) Databases() []string { defer s.mu.RUnlock() databases := make([]string, 0, len(s.databases)) - for k, _ := range s.databases { + for k := range s.databases { databases = append(databases, k) } return databases