diff --git a/internal/cmd/egctl/envoy_dashboard.go b/internal/cmd/egctl/envoy_dashboard.go index c41b76339efa..795b01a38586 100644 --- a/internal/cmd/egctl/envoy_dashboard.go +++ b/internal/cmd/egctl/envoy_dashboard.go @@ -1,3 +1,8 @@ +// Copyright Envoy Gateway Authors +// SPDX-License-Identifier: Apache-2.0 +// The full text of the Apache license is available in the LICENSE file at +// the root of the repo. + package egctl import ( @@ -34,7 +39,7 @@ func newEnvoyDashboardCmd() *cobra.Command { cmd.Println(cmd.UsageString()) return fmt.Errorf("dashboard requires pod name or label selector") } - if len(args) > 0 && labelSelectors != nil { + if len(args) > 0 && len(labelSelectors) > 0 { cmd.Println(cmd.UsageString()) return fmt.Errorf("name cannot be provided when a selector is specified") }