fix S1019 use of make

Signed-off-by: Ken Sipe <kensipe@gmail.com>

Kubernetes-commit: a4d05d51d95d30ebe90ec8f652c9a794caa44d53
This commit is contained in:
Ken Sipe 2020-06-25 17:26:42 -05:00 committed by Kubernetes Publisher
parent 92af261bb8
commit b60943f03a
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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,
},
{

View File

@ -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