MCPcopy Create free account
hub / github.com/cli/cli / MultiSelectWithSearch

Method MultiSelectWithSearch

internal/prompter/test.go:100–108  ·  view source on GitHub ↗
(prompt, searchPrompt string, defaults []string, persistentOptions []string, searchFunc func(string) MultiSelectSearchResult)

Source from the content-addressed store, hash-verified

98}
99
100func (m *MockPrompter) MultiSelectWithSearch(prompt, searchPrompt string, defaults []string, persistentOptions []string, searchFunc func(string) MultiSelectSearchResult) ([]string, error) {
101 var s multiSelectWithSearchStub
102 if len(m.multiSelectWithSearchStubs) == 0 {
103 return nil, NoSuchPromptErr(prompt)
104 }
105 s = m.multiSelectWithSearchStubs[0]
106 m.multiSelectWithSearchStubs = m.multiSelectWithSearchStubs[1:len(m.multiSelectWithSearchStubs)]
107 return s.fn(prompt, searchPrompt, defaults, persistentOptions, searchFunc)
108}
109
110func (m *MockPrompter) RegisterAuthToken(stub func() (string, error)) {
111 m.authTokenStubs = append(m.authTokenStubs, authTokenStub{fn: stub})

Callers

nothing calls this directly

Calls 1

NoSuchPromptErrFunction · 0.85

Tested by

no test coverage detected