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

Method Confirm

internal/prompter/huh_prompter.go:176–183  ·  view source on GitHub ↗
(prompt string, defaultValue bool)

Source from the content-addressed store, hash-verified

174}
175
176func (p *huhPrompter) Confirm(prompt string, defaultValue bool) (bool, error) {
177 form, result := p.buildConfirmForm(prompt, defaultValue)
178 err := p.runForm(form)
179 if err != nil {
180 return false, err
181 }
182 return *result, nil
183}
184
185func (p *huhPrompter) buildAuthTokenForm() (*huh.Form, *string) {
186 var result string

Callers

nothing calls this directly

Calls 2

buildConfirmFormMethod · 0.95
runFormMethod · 0.95

Tested by

no test coverage detected