diff --git a/pkg/storage/cacher/watch_cache_test.go b/pkg/storage/cacher/watch_cache_test.go index ca2004e46..cedf2ac36 100644 --- a/pkg/storage/cacher/watch_cache_test.go +++ b/pkg/storage/cacher/watch_cache_test.go @@ -139,7 +139,7 @@ func TestWatchCacheBasic(t *testing.T) { "prefix/ns/pod2": *makeTestStoreElement(makeTestPod("pod2", 5)), "prefix/ns/pod3": *makeTestStoreElement(makeTestPod("pod3", 6)), } - items := make(map[string]storeElement, 0) + items := make(map[string]storeElement) for _, item := range store.List() { elem := item.(*storeElement) items[elem.Key] = *elem diff --git a/pkg/util/shufflesharding/shufflesharding_test.go b/pkg/util/shufflesharding/shufflesharding_test.go index 4e71a942a..85230a83a 100644 --- a/pkg/util/shufflesharding/shufflesharding_test.go +++ b/pkg/util/shufflesharding/shufflesharding_test.go @@ -277,7 +277,7 @@ func TestDealer_DealIntoHand(t *testing.T) { }, { "size: 6 cap: 6 slice", - make([]int, 6, 6), + make([]int, 6), 6, }, { @@ -287,7 +287,7 @@ func TestDealer_DealIntoHand(t *testing.T) { }, { "size: 4 cap: 4 slice", - make([]int, 4, 4), + make([]int, 4), 6, }, { @@ -297,7 +297,7 @@ func TestDealer_DealIntoHand(t *testing.T) { }, { "size: 10 cap: 10 slice", - make([]int, 10, 10), + make([]int, 10), 6, }, { diff --git a/pkg/util/wsstream/conn_test.go b/pkg/util/wsstream/conn_test.go index 1c049aad7..53ae32a37 100644 --- a/pkg/util/wsstream/conn_test.go +++ b/pkg/util/wsstream/conn_test.go @@ -238,7 +238,7 @@ func TestVersionedConn(t *testing.T) { conn := NewConn(supportedProtocols) // note that it's not enough to wait for conn.ready to avoid a race here. Hence, // we use a channel. - selectedProtocol := make(chan string, 0) + selectedProtocol := make(chan string) s, addr := newServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { p, _, _ := conn.Open(w, req) selectedProtocol <- p