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 ```