diff --git a/cli/cmd/proxy/list/command.go b/cli/cmd/proxy/list/command.go index afe34fcb3c..41a6d0030f 100644 --- a/cli/cmd/proxy/list/command.go +++ b/cli/cmd/proxy/list/command.go @@ -234,15 +234,15 @@ func (c *ListCommand) fetchPods() ([]v1.Pod, error) { } if len(apigatewaypods.Items) > 0 { //Deduplicated pod list - seenPods := map[string]bool{} + seenPods := map[string]struct{}{} for _, pod := range apigatewaypods.Items { - if seenPods[namespacedName(pod)] { + if _, ok := seenPods[namespacedName(pod)]; ok { continue } found := false for _, gatewayPod := range gatewaypods.Items { //note that we already have this pod in the list so we can exit early. - seenPods[namespacedName(gatewayPod)] = true + seenPods[namespacedName(gatewayPod)] = struct{}{} if (namespacedName(gatewayPod)) == namespacedName(pod) { found = true diff --git a/cli/cmd/proxy/list/command_test.go b/cli/cmd/proxy/list/command_test.go index ff2e608d28..5493ab88a9 100644 --- a/cli/cmd/proxy/list/command_test.go +++ b/cli/cmd/proxy/list/command_test.go @@ -433,7 +433,6 @@ func TestListCommandOutputInJsonFormat(t *testing.T) { require.Equal(t, 0, out) actual := buf.String() - fmt.Println(actual) require.Regexp(t, expected, actual) for _, expression := range notExpected {