MCPcopy
hub / github.com/spf13/cobra / ExactValidArgs

Function ExactValidArgs

args.go:129–131  ·  view source on GitHub ↗

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: use MatchAll(ExactArgs(n), OnlyValidArgs) instead

(n int)

Source from the content-addressed store, hash-verified

127//
128// Deprecated: use MatchAll(ExactArgs(n), OnlyValidArgs) instead
129func ExactValidArgs(n int) PositionalArgs {
130 return MatchAll(ExactArgs(n), OnlyValidArgs)
131}

Calls 2

MatchAllFunction · 0.85
ExactArgsFunction · 0.85