(n int, msg string)
| 22 | } |
| 23 | |
| 24 | func ExactArgs(n int, msg string) cobra.PositionalArgs { |
| 25 | return func(cmd *cobra.Command, args []string) error { |
| 26 | if len(args) > n { |
| 27 | return FlagErrorf("too many arguments") |
| 28 | } |
| 29 | |
| 30 | if len(args) < n { |
| 31 | return FlagErrorf("%s", msg) |
| 32 | } |
| 33 | |
| 34 | return nil |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | func NoArgsQuoteReminder(cmd *cobra.Command, args []string) error { |
| 39 | if len(args) < 1 { |
no test coverage detected