Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiaop committed Feb 22, 2024
1 parent 5e9098d commit 0ec8915
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/cmd/egctl/envoy_dashboard.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit 0ec8915

Please sign in to comment.