next : consistent default case handling across subcmds
This commit is contained in:
parent
b5075786c6
commit
0ff9e6d9a3
2 changed files with 3 additions and 4 deletions
|
|
@ -32,11 +32,11 @@ func parseArgs(args []string) options {
|
|||
opts.Descriptor.Val = arg
|
||||
case i == 1 && !flags.HasDashPrefix(arg):
|
||||
opts.Tags.Val = arg
|
||||
case i >= 2:
|
||||
log.Printf("um next: too many args: %s", args)
|
||||
flags.Help("next", opts)
|
||||
case arg == opts.Help.Long || arg == opts.Help.Short:
|
||||
flags.Help("next", opts)
|
||||
default:
|
||||
log.Printf("um next: invalid argument: %s", arg)
|
||||
flags.Help("next", opts)
|
||||
}
|
||||
}
|
||||
return opts
|
||||
|
|
|
|||
Loading…
Reference in a new issue