NoArgs returns an error if any args are included.
(cmd *Command, args []string)
| 40 | |
| 41 | // NoArgs returns an error if any args are included. |
| 42 | func NoArgs(cmd *Command, args []string) error { |
| 43 | if len(args) > 0 { |
| 44 | return fmt.Errorf("unknown command %q for %q", args[0], cmd.CommandPath()) |
| 45 | } |
| 46 | return nil |
| 47 | } |
| 48 | |
| 49 | // OnlyValidArgs returns an error if there are any positional args that are not in |
| 50 | // the `ValidArgs` field of `Command` |
nothing calls this directly
no test coverage detected