File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -76,12 +76,17 @@ func RangeArgs(min int, max int) PositionalArgs {
76
76
}
77
77
}
78
78
79
- // ExactValidArgs is DEPRECATED. Use ExactArgs instead.
79
+ // ExactValidArgs returns an error if there are not exactly N positional args OR
80
+ // there are any positional args that are not in the `ValidArgs` field of `Command`
81
+ //
82
+ // Deprecated: now `ExactArgs` honours `ValidArgs`, when defined and not empty
80
83
func ExactValidArgs (n int ) PositionalArgs {
81
84
return ExactArgs (n )
82
85
}
83
86
84
- // OnlyValidArgs is DEPRECATED. Use ArbitraryArgs instead.
87
+ // OnlyValidArgs returns an error if any args are not in the list of `ValidArgs`.
88
+ //
89
+ // Deprecated: now `ArbitraryArgs` honours `ValidArgs`, when defined and not empty
85
90
func OnlyValidArgs (cmd * Command , args []string ) error {
86
91
return ArbitraryArgs (cmd , args )
87
92
}
You can’t perform that action at this time.
0 commit comments