diff --git a/README.md b/README.md index a4db7465..1cc9a7f9 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 at least one argument and more until one starts with `-` +rootCmd.Flag("nargs-any").Nargs = -1 // consumes at least one argument until one starts with `-` rootCmd.Flag("nargs-two").Nargs = 2 // consumes exactly 2 arguments ```