Skip to content

Commit 13a5c7f

Browse files
committed
fix: mark -n flag as required
1 parent a3467ac commit 13a5c7f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/kic-supportpkg.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ func Execute() {
4444
},
4545
}
4646

47-
rootCmd.Flags().StringSliceVarP(&namespaces, "namespace", "n", []string{}, "comma-separated list of namespaces to collect information from")
48-
rootCmd.SetUsageTemplate("Usage: \n kic-supportpkg -n namespace1 -n namespace2 ...")
47+
rootCmd.Flags().StringSliceVarP(&namespaces, "namespace", "n", []string{}, "list of namespaces to collect information from")
48+
rootCmd.MarkFlagRequired("namespace")
49+
rootCmd.SetUsageTemplate("Usage: \n kic supportpkg [-n|--namespace] ns1 [-n|--namespace] ns2 ...\n kic supportpkg [-n|--namespace] ns1,ns2 ...\n")
4950

5051
if err := rootCmd.Execute(); err != nil {
5152
fmt.Println(err)

0 commit comments

Comments
 (0)