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

Method Code

pkg/search/searcher_mock.go:93–106  ·  view source on GitHub ↗

Code calls CodeFunc.

(query Query)

Source from the content-addressed store, hash-verified

91
92// Code calls CodeFunc.
93func (mock *SearcherMock) Code(query Query) (CodeResult, error) {
94 if mock.CodeFunc == nil {
95 panic("SearcherMock.CodeFunc: method is nil but Searcher.Code was just called")
96 }
97 callInfo := struct {
98 Query Query
99 }{
100 Query: query,
101 }
102 mock.lockCode.Lock()
103 mock.calls.Code = append(mock.calls.Code, callInfo)
104 mock.lockCode.Unlock()
105 return mock.CodeFunc(query)
106}
107
108// CodeCalls gets all the calls that were made to Code.
109// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected