Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube authored Jan 29, 2023
1 parent ccef579 commit 3bcf79d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit 3bcf79d

Please sign in to comment.