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

Method Dispatch

pkg/extensions/manager_mock.go:187–206  ·  view source on GitHub ↗

Dispatch calls DispatchFunc.

(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer)

Source from the content-addressed store, hash-verified

185
186// Dispatch calls DispatchFunc.
187func (mock *ExtensionManagerMock) Dispatch(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) (bool, error) {
188 if mock.DispatchFunc == nil {
189 panic("ExtensionManagerMock.DispatchFunc: method is nil but ExtensionManager.Dispatch was just called")
190 }
191 callInfo := struct {
192 Args []string
193 Stdin io.Reader
194 Stdout io.Writer
195 Stderr io.Writer
196 }{
197 Args: args,
198 Stdin: stdin,
199 Stdout: stdout,
200 Stderr: stderr,
201 }
202 mock.lockDispatch.Lock()
203 mock.calls.Dispatch = append(mock.calls.Dispatch, callInfo)
204 mock.lockDispatch.Unlock()
205 return mock.DispatchFunc(args, stdin, stdout, stderr)
206}
207
208// DispatchCalls gets all the calls that were made to Dispatch.
209// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected