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

Function IndexesFor

internal/prompter/test.go:159–169  ·  view source on GitHub ↗
(options []string, answers ...string)

Source from the content-addressed store, hash-verified

157}
158
159func IndexesFor(options []string, answers ...string) ([]int, error) {
160 indexes := make([]int, len(answers))
161 for i, answer := range answers {
162 index, err := IndexFor(options, answer)
163 if err != nil {
164 return nil, err
165 }
166 indexes[i] = index
167 }
168 return indexes, nil
169}
170
171func NoSuchPromptErr(prompt string) error {
172 return fmt.Errorf("no such prompt '%s'", prompt)

Callers 3

Test_createRunFunction · 0.92
Test_createRun_GHESFunction · 0.92

Calls 1

IndexForFunction · 0.85

Tested by 3

Test_createRunFunction · 0.74
Test_createRun_GHESFunction · 0.74