MCPcopy Create free account
hub / github.com/auth0/auth0-cli / pickManyFlag

Function pickManyFlag

internal/cli/flags.go:247–269  ·  view source on GitHub ↗
(cmd *cobra.Command, f *Flag, result *[]string, fn pickerOptionsFunc)

Source from the content-addressed store, hash-verified

245}
246
247func pickManyFlag(cmd *cobra.Command, f *Flag, result *[]string, fn pickerOptionsFunc) error {
248 if shouldAsk(cmd, f, false) {
249 var opts pickerOptions
250 err := ansi.Waiting(func() error {
251 var err error
252 opts, err = fn(cmd.Context())
253 return err
254 })
255
256 if err != nil {
257 return err
258 }
259
260 var values []string
261 if err := askMultiSelect(f, &values, opts.labels()...); err != nil {
262 return err
263 }
264
265 *result = opts.getValues(values...)
266 }
267
268 return nil
269}
270
271func askPasswordFlag(cmd *cobra.Command, f *Flag, value *string, isUpdate bool) error {
272 if shouldAsk(cmd, f, isUpdate) {

Callers 1

PickManyMethod · 0.85

Calls 5

labelsMethod · 0.95
getValuesMethod · 0.95
WaitingFunction · 0.92
shouldAskFunction · 0.85
askMultiSelectFunction · 0.85

Tested by

no test coverage detected