Fetch the repository succeeded.
// Code generated by counterfeiter. DO NOT EDIT.
package mock
import (
"sync"
)
type Reader struct {
ReadFileStub func(string) ([]byte, error)
readFileMutex sync.RWMutex
readFileArgsForCall []struct {
arg1 string
}
readFileReturns struct {
result1 []byte
result2 error
}
readFileReturnsOnCall map[int]struct {
result1 []byte
result2 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *Reader) ReadFile(arg1 string) ([]byte, error) {
fake.readFileMutex.Lock()
ret, specificReturn := fake.readFileReturnsOnCall[len(fake.readFileArgsForCall)]
fake.readFileArgsForCall = append(fake.readFileArgsForCall, struct {
arg1 string
}{arg1})
fake.recordInvocation("ReadFile", []interface{}{arg1})
fake.readFileMutex.Unlock()
if fake.ReadFileStub != nil {
return fake.ReadFileStub(arg1)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.readFileReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *Reader) ReadFileCallCount() int {
fake.readFileMutex.RLock()
defer fake.readFileMutex.RUnlock()
return len(fake.readFileArgsForCall)
}
func (fake *Reader) ReadFileCalls(stub func(string) ([]byte, error)) {
fake.readFileMutex.Lock()
defer fake.readFileMutex.Unlock()
fake.ReadFileStub = stub
}
func (fake *Reader) ReadFileArgsForCall(i int) string {
fake.readFileMutex.RLock()
defer fake.readFileMutex.RUnlock()
argsForCall := fake.readFileArgsForCall[i]
return argsForCall.arg1
}
func (fake *Reader) ReadFileReturns(result1 []byte, result2 error) {
fake.readFileMutex.Lock()
defer fake.readFileMutex.Unlock()
fake.ReadFileStub = nil
fake.readFileReturns = struct {
result1 []byte
result2 error
}{result1, result2}
}
func (fake *Reader) ReadFileReturnsOnCall(i int, result1 []byte, result2 error) {
fake.readFileMutex.Lock()
defer fake.readFileMutex.Unlock()
fake.ReadFileStub = nil
if fake.readFileReturnsOnCall == nil {
fake.readFileReturnsOnCall = make(map[int]struct {
result1 []byte
result2 error
})
}
fake.readFileReturnsOnCall[i] = struct {
result1 []byte
result2 error
}{result1, result2}
}
func (fake *Reader) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.readFileMutex.RLock()
defer fake.readFileMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *Reader) recordInvocation(key string, args []interface{}) {
fake.invocationsMutex.Lock()
defer fake.invocationsMutex.Unlock()
if fake.invocations == nil {
fake.invocations = map[string][][]interface{}{}
}
if fake.invocations[key] == nil {
fake.invocations[key] = [][]interface{}{}
}
fake.invocations[key] = append(fake.invocations[key], args)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。