MCPcopy Index your code
hub / github.com/cli/cli / ask

Method ask

internal/prompter/prompter.go:578–585  ·  view source on GitHub ↗
(q survey.Prompt, response interface{}, opts ...survey.AskOpt)

Source from the content-addressed store, hash-verified

576}
577
578func (p *surveyPrompter) ask(q survey.Prompt, response interface{}, opts ...survey.AskOpt) error {
579 opts = append(opts, survey.WithStdio(p.stdin, p.stdout, p.stderr))
580 err := survey.AskOne(q, response, opts...)
581 if err == nil {
582 return nil
583 }
584 return fmt.Errorf("could not prompt: %w", err)
585}

Callers 4

AuthTokenMethod · 0.95
ConfirmDeletionMethod · 0.95
InputHostnameMethod · 0.95
MarkdownEditorMethod · 0.95

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected