From 3bcf79df3d00e50400a94ac3e0590c0bb537af6d Mon Sep 17 00:00:00 2001 From: rsteube Date: Sun, 29 Jan 2023 21:10:23 +0100 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7637125c..a4db7465 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,6 @@ Support for flags consuming multiple arguments. rootCmd.Flags().StringSlice("nargs-any", []string{}, "Nargs") rootCmd.Flags().StringSlice("nargs-two", []string{}, "Nargs") -rootCmd.Flag("nargs-any").Nargs = -1 // consumes any argument until one starts with `-` +rootCmd.Flag("nargs-any").Nargs = -1 // consumes at least one argument and more until one starts with `-` rootCmd.Flag("nargs-two").Nargs = 2 // consumes exactly 2 arguments ```