From 062392b2ca4d1ce43c78307132192699deddf8e2 Mon Sep 17 00:00:00 2001 From: guoxudong Date: Tue, 16 Mar 2021 09:44:04 +0800 Subject: [PATCH] update --- cmd/plugin/cli/root.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/plugin/cli/root.go b/cmd/plugin/cli/root.go index fab6663..5dc147d 100644 --- a/cmd/plugin/cli/root.go +++ b/cmd/plugin/cli/root.go @@ -35,11 +35,11 @@ $ kubectl pod-lens prometheus-prometheus-operator-prometheus-0 _ = viper.BindPFlags(cmd.Flags()) }, RunE: func(cmd *cobra.Command, args []string) error { - if len(args) < 1 { - return errors.New("A pod name is required!") + var podName string + if len(args) > 1 { + podName = args[0] } - podName := args[0] argsChannel := make(chan string, 1) argsChannel <- podName