From 0ec89155a1f16bcefe7b840d137bd01244faf5d3 Mon Sep 17 00:00:00 2001 From: xiaopeng Date: Thu, 22 Feb 2024 10:49:09 +0800 Subject: [PATCH] fix lint --- internal/cmd/egctl/envoy_dashboard.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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") }