From 829386b65ff01a8228e9db038d99226da15f2bd5 Mon Sep 17 00:00:00 2001 From: Albert Nigmatzianov Date: Fri, 28 Jul 2017 08:04:09 +0200 Subject: [PATCH] Fix MinimumArgs --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 24745ad4..72196894 100644 --- a/README.md +++ b/README.md @@ -528,7 +528,7 @@ func main() { Short: "Print anything to the screen", Long: `print is for printing anything back to the screen. For many years people have printed back to the screen.`, - Args: cobra.MinimumArgs(1), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { fmt.Println("Print: " + strings.Join(args, " ")) }, @@ -539,7 +539,7 @@ For many years people have printed back to the screen.`, Short: "Echo anything to the screen", Long: `echo is for echoing anything back. Echo works a lot like print, except it has a child command.`, - Args: cobra.MinimumArgs(1), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { fmt.Println("Print: " + strings.Join(args, " ")) }, @@ -550,7 +550,7 @@ Echo works a lot like print, except it has a child command.`, Short: "Echo anything to the screen more times", Long: `echo things multiple times back to the user by providing a count and a string.`, - Args: cobra.MinimumArgs(1), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { for i := 0; i < echoTimes; i++ { fmt.Println("Echo: " + strings.Join(args, " "))