minor tweaks

This commit is contained in:
Mat Ryer 2016-08-29 13:11:07 +01:00
parent da0b19b274
commit 44a00e67b4

View File

@ -182,9 +182,9 @@ type {{.Name}}Mock struct {
{{ end }}} {{ end }}}
{{ range .Methods }} {{ range .Methods }}
// {{.Name}} calls the mocked {{.Name}}Func function. // {{.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 { 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 }}) return mock.{{.Name}}Func({{ .ArgCallList }})
} }