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

Method MultiSelect

internal/prompter/huh_prompter.go:100–107  ·  view source on GitHub ↗
(prompt string, defaults []string, options []string)

Source from the content-addressed store, hash-verified

98}
99
100func (p *huhPrompter) MultiSelect(prompt string, defaults []string, options []string) ([]int, error) {
101 form, result := p.buildMultiSelectForm(prompt, defaults, options)
102 err := p.runForm(form)
103 if err != nil {
104 return nil, err
105 }
106 return *result, nil
107}
108
109func (p *huhPrompter) buildMultiSelectWithSearchForm(prompt, searchPrompt string, defaultValues, persistentValues []string, searchFunc func(string) MultiSelectSearchResult) (*huh.Form, *multiSelectSearchField) {
110 field := newMultiSelectSearchField(prompt, searchPrompt, defaultValues, persistentValues, searchFunc)

Callers

nothing calls this directly

Calls 2

buildMultiSelectFormMethod · 0.95
runFormMethod · 0.95

Tested by

no test coverage detected