(cmd *cobra.Command, f *Flag, value *[]int, defaultValue []int, isUpdate bool)
| 362 | } |
| 363 | |
| 364 | func registerIntSlice(cmd *cobra.Command, f *Flag, value *[]int, defaultValue []int, isUpdate bool) { |
| 365 | cmd.Flags().IntSliceVarP(value, f.LongForm, f.ShortForm, defaultValue, f.Help) |
| 366 | |
| 367 | // Set up flag aliases if specified. |
| 368 | if len(f.AlsoKnownAs) > 0 { |
| 369 | flag := cmd.Flags().Lookup(f.LongForm) |
| 370 | if flag != nil { |
| 371 | for _, alias := range f.AlsoKnownAs { |
| 372 | cmd.Flags().IntSliceVar(value, alias, defaultValue, f.Help) |
| 373 | } |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | if err := markFlagRequired(cmd, f, isUpdate); err != nil { |
| 378 | panic(auth0.Error(err, "failed to register int slice flag")) |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | func askIntSlice(i commandInput, value *[]int, defaultValue *[]int) error { |
| 383 | var strInput string |
no test coverage detected