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

Method MultiSelectWithSearch

internal/prompter/prompter_mock.go:411–432  ·  view source on GitHub ↗

MultiSelectWithSearch calls MultiSelectWithSearchFunc.

(prompt string, searchPrompt string, defaults []string, persistentOptions []string, searchFunc func(string) MultiSelectSearchResult)

Source from the content-addressed store, hash-verified

409
410// MultiSelectWithSearch calls MultiSelectWithSearchFunc.
411func (mock *PrompterMock) MultiSelectWithSearch(prompt string, searchPrompt string, defaults []string, persistentOptions []string, searchFunc func(string) MultiSelectSearchResult) ([]string, error) {
412 if mock.MultiSelectWithSearchFunc == nil {
413 panic("PrompterMock.MultiSelectWithSearchFunc: method is nil but Prompter.MultiSelectWithSearch was just called")
414 }
415 callInfo := struct {
416 Prompt string
417 SearchPrompt string
418 Defaults []string
419 PersistentOptions []string
420 SearchFunc func(string) MultiSelectSearchResult
421 }{
422 Prompt: prompt,
423 SearchPrompt: searchPrompt,
424 Defaults: defaults,
425 PersistentOptions: persistentOptions,
426 SearchFunc: searchFunc,
427 }
428 mock.lockMultiSelectWithSearch.Lock()
429 mock.calls.MultiSelectWithSearch = append(mock.calls.MultiSelectWithSearch, callInfo)
430 mock.lockMultiSelectWithSearch.Unlock()
431 return mock.MultiSelectWithSearchFunc(prompt, searchPrompt, defaults, persistentOptions, searchFunc)
432}
433
434// MultiSelectWithSearchCalls gets all the calls that were made to MultiSelectWithSearch.
435// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected