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

Method Input

internal/prompter/prompter_mock.go:268–283  ·  view source on GitHub ↗

Input calls InputFunc.

(prompt string, defaultValue string)

Source from the content-addressed store, hash-verified

266
267// Input calls InputFunc.
268func (mock *PrompterMock) Input(prompt string, defaultValue string) (string, error) {
269 if mock.InputFunc == nil {
270 panic("PrompterMock.InputFunc: method is nil but Prompter.Input was just called")
271 }
272 callInfo := struct {
273 Prompt string
274 DefaultValue string
275 }{
276 Prompt: prompt,
277 DefaultValue: defaultValue,
278 }
279 mock.lockInput.Lock()
280 mock.calls.Input = append(mock.calls.Input, callInfo)
281 mock.lockInput.Unlock()
282 return mock.InputFunc(prompt, defaultValue)
283}
284
285// InputCalls gets all the calls that were made to Input.
286// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected