Skip to content

Commit

Permalink
update deprecation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Mar 21, 2019
1 parent 12f90df commit 3149d7c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions args.go
Expand Up @@ -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)
}

0 comments on commit 3149d7c

Please sign in to comment.