Remove moq prefix

This commit is contained in:
Uwe Dauernheim 2017-12-25 14:09:08 +01:00
parent c80e9a745b
commit 12b80de6ea
2 changed files with 3 additions and 3 deletions

View File

@ -28,8 +28,8 @@ func TestMoq(t *testing.T) {
"GetFunc func(ctx context.Context, id string) (*Person, error)", "GetFunc func(ctx context.Context, id string) (*Person, error)",
"func (mock *PersonStoreMock) Create(ctx context.Context, person *Person, confirm bool) error", "func (mock *PersonStoreMock) Create(ctx context.Context, person *Person, confirm bool) error",
"func (mock *PersonStoreMock) Get(ctx context.Context, id string) (*Person, error)", "func (mock *PersonStoreMock) Get(ctx context.Context, id string) (*Person, error)",
"panic(\"moq: PersonStoreMock.CreateFunc is nil but PersonStore.Create was just called\")", "panic(\"PersonStoreMock.CreateFunc: method is nil but PersonStore.Create was just called\")",
"panic(\"moq: PersonStoreMock.GetFunc is nil but PersonStore.Get was just called\")", "panic(\"PersonStoreMock.GetFunc: method is nil but PersonStore.Get was just called\")",
"lockPersonStoreMockGet.Lock()", "lockPersonStoreMockGet.Lock()",
"mock.calls.Get = append(mock.calls.Get, callInfo)", "mock.calls.Get = append(mock.calls.Get, callInfo)",
"lockPersonStoreMockGet.Unlock()", "lockPersonStoreMockGet.Unlock()",

View File

@ -59,7 +59,7 @@ type {{.InterfaceName}}Mock struct {
// {{.Name}} calls {{.Name}}Func. // {{.Name}} calls {{.Name}}Func.
func (mock *{{$obj.InterfaceName}}Mock) {{.Name}}({{.Arglist}}) {{.ReturnArglist}} { func (mock *{{$obj.InterfaceName}}Mock) {{.Name}}({{.Arglist}}) {{.ReturnArglist}} {
if mock.{{.Name}}Func == nil { if mock.{{.Name}}Func == nil {
panic("moq: {{$obj.InterfaceName}}Mock.{{.Name}}Func is nil but {{$obj.InterfaceName}}.{{.Name}} was just called") panic("{{$obj.InterfaceName}}Mock.{{.Name}}Func: method is nil but {{$obj.InterfaceName}}.{{.Name}} was just called")
} }
callInfo := struct { callInfo := struct {
{{- range .Params }} {{- range .Params }}