diff --git a/README.md b/README.md index 71bd5d38..e0a7e230 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,12 @@ rootCmd.Flag("agentlib").OptargDelimiter = ':' ### Nargs **Experimental** Support for flags consuming multiple arguments. -Use with `Slice` and `Array` flag types. +> Use with `Slice` and `Array` flag types. ```go - rootCmd.Flags().StringSlice("nargs-any", []string{}, "Nargs") - rootCmd.Flags().StringSlice("nargs-two", []string{}, "Nargs") +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-two").Nargs = 2 // consumes exactly 2 arguments -``` \ No newline at end of file +rootCmd.Flag("nargs-any").Nargs = -1 // consumes any argument until one starts with `-` +rootCmd.Flag("nargs-two").Nargs = 2 // consumes exactly 2 arguments +```