diff --git a/mvcc/key_index_test.go b/mvcc/key_index_test.go index 44f69084f..bfaed9856 100644 --- a/mvcc/key_index_test.go +++ b/mvcc/key_index_test.go @@ -239,7 +239,7 @@ func TestKeyIndexCompact(t *testing.T) { }, }, map[revision]struct{}{ - revision{main: 2}: {}, + {main: 2}: {}, }, }, { @@ -255,7 +255,7 @@ func TestKeyIndexCompact(t *testing.T) { }, }, map[revision]struct{}{ - revision{main: 2}: {}, + {main: 2}: {}, }, }, { @@ -271,7 +271,7 @@ func TestKeyIndexCompact(t *testing.T) { }, }, map[revision]struct{}{ - revision{main: 4}: {}, + {main: 4}: {}, }, }, { @@ -287,7 +287,7 @@ func TestKeyIndexCompact(t *testing.T) { }, }, map[revision]struct{}{ - revision{main: 4}: {}, + {main: 4}: {}, }, }, { @@ -328,7 +328,7 @@ func TestKeyIndexCompact(t *testing.T) { }, }, map[revision]struct{}{ - revision{main: 8}: {}, + {main: 8}: {}, }, }, { @@ -343,7 +343,7 @@ func TestKeyIndexCompact(t *testing.T) { }, }, map[revision]struct{}{ - revision{main: 8}: {}, + {main: 8}: {}, }, }, { @@ -358,7 +358,7 @@ func TestKeyIndexCompact(t *testing.T) { }, }, map[revision]struct{}{ - revision{main: 10}: {}, + {main: 10}: {}, }, }, { @@ -373,7 +373,7 @@ func TestKeyIndexCompact(t *testing.T) { }, }, map[revision]struct{}{ - revision{main: 10}: {}, + {main: 10}: {}, }, }, { @@ -411,7 +411,7 @@ func TestKeyIndexCompact(t *testing.T) { }, }, map[revision]struct{}{ - revision{main: 14, sub: 1}: {}, + {main: 14, sub: 1}: {}, }, }, { @@ -425,7 +425,7 @@ func TestKeyIndexCompact(t *testing.T) { }, }, map[revision]struct{}{ - revision{main: 14, sub: 1}: {}, + {main: 14, sub: 1}: {}, }, }, { @@ -499,7 +499,7 @@ func TestKeyIndexCompactOnFurtherRev(t *testing.T) { }, } wam := map[revision]struct{}{ - revision{main: 2}: {}, + {main: 2}: {}, } if !reflect.DeepEqual(ki, wki) { t.Errorf("ki = %+v, want %+v", ki, wki) diff --git a/mvcc/kvstore_compaction_test.go b/mvcc/kvstore_compaction_test.go index a631ed1ff..b2ee570f9 100644 --- a/mvcc/kvstore_compaction_test.go +++ b/mvcc/kvstore_compaction_test.go @@ -48,7 +48,7 @@ func TestScheduleCompaction(t *testing.T) { { 1, map[revision]struct{}{ - revision{main: 1}: {}, + {main: 1}: {}, }, revs, }, @@ -56,8 +56,8 @@ func TestScheduleCompaction(t *testing.T) { { 3, map[revision]struct{}{ - revision{main: 2}: {}, - revision{main: 3}: {}, + {main: 2}: {}, + {main: 3}: {}, }, revs[1:], }, diff --git a/mvcc/kvstore_test.go b/mvcc/kvstore_test.go index 2bcb87642..6fb1adf5c 100644 --- a/mvcc/kvstore_test.go +++ b/mvcc/kvstore_test.go @@ -329,7 +329,7 @@ func TestStoreCompact(t *testing.T) { fi := s.kvindex.(*fakeIndex) s.currentRev = revision{3, 0} - fi.indexCompactRespc <- map[revision]struct{}{revision{1, 0}: {}} + fi.indexCompactRespc <- map[revision]struct{}{{1, 0}: {}} key1 := newTestKeyBytes(revision{1, 0}, false) key2 := newTestKeyBytes(revision{2, 0}, false) b.tx.rangeRespc <- rangeResp{[][]byte{key1, key2}, nil} diff --git a/rafthttp/urlpick_test.go b/rafthttp/urlpick_test.go index 458664197..70ebbd326 100644 --- a/rafthttp/urlpick_test.go +++ b/rafthttp/urlpick_test.go @@ -28,8 +28,8 @@ func TestURLPickerPickTwice(t *testing.T) { u := picker.pick() urlmap := map[url.URL]bool{ - url.URL{Scheme: "http", Host: "127.0.0.1:2380"}: true, - url.URL{Scheme: "http", Host: "127.0.0.1:7001"}: true, + {Scheme: "http", Host: "127.0.0.1:2380"}: true, + {Scheme: "http", Host: "127.0.0.1:7001"}: true, } if !urlmap[u] { t.Errorf("url picked = %+v, want a possible url in %+v", u, urlmap) @@ -48,8 +48,8 @@ func TestURLPickerUpdate(t *testing.T) { u := picker.pick() urlmap := map[url.URL]bool{ - url.URL{Scheme: "http", Host: "localhost:2380"}: true, - url.URL{Scheme: "http", Host: "localhost:7001"}: true, + {Scheme: "http", Host: "localhost:2380"}: true, + {Scheme: "http", Host: "localhost:7001"}: true, } if !urlmap[u] { t.Errorf("url picked = %+v, want a possible url in %+v", u, urlmap)