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

Function ask

internal/cli/input.go:22–31  ·  view source on GitHub ↗
(i commandInput, value interface{}, defaultValue *string, isUpdate bool)

Source from the content-addressed store, hash-verified

20}
21
22func ask(i commandInput, value interface{}, defaultValue *string, isUpdate bool) error {
23 isRequired := isInputRequired(i, isUpdate)
24 input := prompt.TextInput("", i.GetLabel(), i.GetHelp(), auth0.StringValue(defaultValue), isRequired)
25
26 if err := prompt.AskOne(input, value); err != nil {
27 return handleInputError(err)
28 }
29
30 return nil
31}
32
33func askBool(i commandInput, value *bool, defaultValue *bool) error {
34 if err := prompt.AskBool(i.GetLabel(), value, auth0.BoolValue(defaultValue)); err != nil {

Callers 4

askFlagFunction · 0.85
askManyFlagFunction · 0.85
askIntSliceFunction · 0.85
askArgumentFunction · 0.85

Calls 6

TextInputFunction · 0.92
AskOneFunction · 0.92
isInputRequiredFunction · 0.85
handleInputErrorFunction · 0.85
GetLabelMethod · 0.65
GetHelpMethod · 0.65

Tested by

no test coverage detected