diff --git a/args.go b/args.go index 099d0a395..0a727a8a6 100644 --- a/args.go +++ b/args.go @@ -76,12 +76,17 @@ func RangeArgs(min int, max int) PositionalArgs { } } -// ExactValidArgs is DEPRECATED. Use ExactArgs instead. +// ExactValidArgs returns an error if there are not exactly N positional args OR +// there are any positional args that are not in the `ValidArgs` field of `Command` +// +// Deprecated: now `ExactArgs` honours `ValidArgs`, when defined and not empty func ExactValidArgs(n int) PositionalArgs { return ExactArgs(n) } -// OnlyValidArgs is DEPRECATED. Use ArbitraryArgs instead. +// OnlyValidArgs returns an error if any args are not in the list of `ValidArgs`. +// +// Deprecated: now `ArbitraryArgs` honours `ValidArgs`, when defined and not empty func OnlyValidArgs(cmd *Command, args []string) error { return ArbitraryArgs(cmd, args) }