Commit graph

2 commits

Author SHA1 Message Date
Brian Fitzgerald
d8e244d161 Updates NoArgs to also report invalid argument
NoArgs currently reports "unknown command" in all cases, which
can be is a little misleading to the user if there are no
subcommands. Change it as follows

- if subcommands and one extra arg, say "unknown command"
- otherwise, say "invalid argument(s)" and show all extra args

This should produce more meaningful error messages to users, and
works for both the root and sub-commands.
2018-04-06 13:13:55 -07:00
Albert Nigmatzianov
18eefcde17 Add tests for args.go 2017-11-09 07:56:43 +01:00