From 8095ca31dd6a9a6a200ac88672b1786a6212ddae Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 30 Aug 2022 19:57:51 +0200 Subject: [PATCH] adjust docs --- args.go | 2 +- user_guide.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/args.go b/args.go index 3f77ff10..e2f40d51 100644 --- a/args.go +++ b/args.go @@ -111,7 +111,7 @@ func MatchAll(pargs ...PositionalArgs) PositionalArgs { // 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(OnlyValidArgs, ExactArgs(n)) instead +// Deprecated: use MatchAll(ExactArgs(n), OnlyValidArgs) instead func ExactValidArgs(n int) PositionalArgs { return MatchAll(ExactArgs(n), OnlyValidArgs) } diff --git a/user_guide.md b/user_guide.md index 8d81162a..6128ae46 100644 --- a/user_guide.md +++ b/user_guide.md @@ -349,7 +349,7 @@ shown below: ```go var cmd = &cobra.Command{ Short: "hello", - Args: MatchAll(OnlyValidArgs, ExactArgs(2)), + Args: MatchAll(ExactArgs(2), OnlyValidArgs), Run: func(cmd *cobra.Command, args []string) { fmt.Println("Hello, World!") },