mirror of
https://github.com/spf13/cobra
synced 2025-05-06 05:17:21 +00:00
specify the color as the required arg (#777)
This commit is contained in:
parent
10db418b0a
commit
0a6c06ed0b
1 changed files with 1 additions and 1 deletions
|
@ -399,7 +399,7 @@ var cmd = &cobra.Command{
|
|||
Short: "hello",
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
if len(args) < 1 {
|
||||
return errors.New("requires at least one arg")
|
||||
return errors.New("requires a color argument")
|
||||
}
|
||||
if myapp.IsValidColor(args[0]) {
|
||||
return nil
|
||||
|
|
Loading…
Add table
Reference in a new issue