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

Method Confirm

internal/prompter/prompter_mock.go:200–215  ·  view source on GitHub ↗

Confirm calls ConfirmFunc.

(prompt string, defaultValue bool)

Source from the content-addressed store, hash-verified

198
199// Confirm calls ConfirmFunc.
200func (mock *PrompterMock) Confirm(prompt string, defaultValue bool) (bool, error) {
201 if mock.ConfirmFunc == nil {
202 panic("PrompterMock.ConfirmFunc: method is nil but Prompter.Confirm was just called")
203 }
204 callInfo := struct {
205 Prompt string
206 DefaultValue bool
207 }{
208 Prompt: prompt,
209 DefaultValue: defaultValue,
210 }
211 mock.lockConfirm.Lock()
212 mock.calls.Confirm = append(mock.calls.Confirm, callInfo)
213 mock.lockConfirm.Unlock()
214 return mock.ConfirmFunc(prompt, defaultValue)
215}
216
217// ConfirmCalls gets all the calls that were made to Confirm.
218// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected