No need to check the lenght of args

If the line is being executed, that means the lenght
of the args is zero.
This commit is contained in:
zzxwill
2020-07-09 23:15:21 +08:00
parent a36e5e9051
commit ece0e76b65

View File

@@ -64,10 +64,8 @@ func NewCmdRun(f cmdutil.Factory, c client.Client, ioStreams cmdutil.IOStreams)
rudrx run containerized frontend -p 80 oam-dev/demo:v1
`,
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
fmt.Println("You must specify a workload, like " + strings.Join(workloadShortNames, ", ") +
"\nSee 'rudr run -h' for help and examples")
}
fmt.Println("You must specify a workload, like " + strings.Join(workloadShortNames, ", ") +
"\nSee 'rudr run -h' for help and examples")
},
}