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

Method Select

internal/prompter/huh_prompter.go:67–71  ·  view source on GitHub ↗
(prompt, defaultValue string, options []string)

Source from the content-addressed store, hash-verified

65}
66
67func (p *huhPrompter) Select(prompt, defaultValue string, options []string) (int, error) {
68 form, result := p.buildSelectForm(prompt, defaultValue, options)
69 err := p.runForm(form)
70 return *result, err
71}
72
73func (p *huhPrompter) buildMultiSelectForm(prompt string, defaults []string, options []string) (*huh.Form, *[]int) {
74 var result []int

Callers

nothing calls this directly

Calls 2

buildSelectFormMethod · 0.95
runFormMethod · 0.95

Tested by

no test coverage detected