diff --git a/package/moq/moq.go b/package/moq/moq.go index 4cd2ac2..3ed65ec 100644 --- a/package/moq/moq.go +++ b/package/moq/moq.go @@ -182,9 +182,9 @@ type {{.Name}}Mock struct { {{ end }}} {{ range .Methods }} // {{.Name}} calls the mocked {{.Name}}Func function. -func (mock *{{.Name}}Mock) {{.Name}}({{ .Arglist }}) {{.ReturnArglist}} { +func (mock {{.Name}}Mock) {{.Name}}({{ .Arglist }}) {{.ReturnArglist}} { if mock.{{.Name}} == nil { - panic("moq: {{.Name}}Func is nil") + panic("moq: {{.Name}}Func is nil but was just called") } return mock.{{.Name}}Func({{ .ArgCallList }}) }