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

Method Select

internal/prompter/prompter_mock.go:491–508  ·  view source on GitHub ↗

Select calls SelectFunc.

(prompt string, defaultValue string, options []string)

Source from the content-addressed store, hash-verified

489
490// Select calls SelectFunc.
491func (mock *PrompterMock) Select(prompt string, defaultValue string, options []string) (int, error) {
492 if mock.SelectFunc == nil {
493 panic("PrompterMock.SelectFunc: method is nil but Prompter.Select was just called")
494 }
495 callInfo := struct {
496 Prompt string
497 DefaultValue string
498 Options []string
499 }{
500 Prompt: prompt,
501 DefaultValue: defaultValue,
502 Options: options,
503 }
504 mock.lockSelect.Lock()
505 mock.calls.Select = append(mock.calls.Select, callInfo)
506 mock.lockSelect.Unlock()
507 return mock.SelectFunc(prompt, defaultValue, options)
508}
509
510// SelectCalls gets all the calls that were made to Select.
511// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected