minor tweaks

This commit is contained in:
Mat Ryer 2016-08-29 13:12:21 +01:00
parent 44a00e67b4
commit 124baf32f3

View File

@ -181,7 +181,8 @@ type {{.Name}}Mock struct {
{{.Name}}Func func({{ .Arglist }}) {{.ReturnArglist}} {{.Name}}Func func({{ .Arglist }}) {{.ReturnArglist}}
{{ end }}} {{ end }}}
{{ range .Methods }} {{ range .Methods }}
// {{.Name}} calls the mocked {{.Name}}Func function. // {{.Name}} calls the mocked {{.Name}}Func function or panics if it was
// not set.
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 but was just called") panic("moq: {{.Name}}Func is nil but was just called")