specify the color as the required arg (#777)

This commit is contained in:
jay vyas 2018-10-27 09:20:53 -04:00 committed by umarcor
parent 10db418b0a
commit 0a6c06ed0b

View file

@ -399,7 +399,7 @@ var cmd = &cobra.Command{
Short: "hello", Short: "hello",
Args: func(cmd *cobra.Command, args []string) error { Args: func(cmd *cobra.Command, args []string) error {
if len(args) < 1 { if len(args) < 1 {
return errors.New("requires at least one arg") return errors.New("requires a color argument")
} }
if myapp.IsValidColor(args[0]) { if myapp.IsValidColor(args[0]) {
return nil return nil