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

Method GetByNumber

pkg/cmd/discussion/client/client_mock.go:368–383  ·  view source on GitHub ↗

GetByNumber calls GetByNumberFunc.

(repo ghrepo.Interface, number int32)

Source from the content-addressed store, hash-verified

366
367// GetByNumber calls GetByNumberFunc.
368func (mock *DiscussionClientMock) GetByNumber(repo ghrepo.Interface, number int32) (*Discussion, error) {
369 if mock.GetByNumberFunc == nil {
370 panic("DiscussionClientMock.GetByNumberFunc: method is nil but DiscussionClient.GetByNumber was just called")
371 }
372 callInfo := struct {
373 Repo ghrepo.Interface
374 Number int32
375 }{
376 Repo: repo,
377 Number: number,
378 }
379 mock.lockGetByNumber.Lock()
380 mock.calls.GetByNumber = append(mock.calls.GetByNumber, callInfo)
381 mock.lockGetByNumber.Unlock()
382 return mock.GetByNumberFunc(repo, number)
383}
384
385// GetByNumberCalls gets all the calls that were made to GetByNumber.
386// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected