@@ -48,7 +48,7 @@ import (
48
48
{{- if not $.SkipEnsure -}}
49
49
// Ensure, that {{.MockName}} does implement {{$.SrcPkgQualifier}}{{.InterfaceName}}.
50
50
// If this is not the case, regenerate this file with moq.
51
- var _ {{$.SrcPkgQualifier}}{{.InterfaceName -}}
51
+ var _ {{$.SrcPkgQualifier}}{{.InterfaceName -}}
52
52
{{- if .TypeParams }}[
53
53
{{- range $index, $param := .TypeParams}}
54
54
{{- if $index}}, {{end -}}
@@ -83,7 +83,7 @@ var _ {{$.SrcPkgQualifier}}{{.InterfaceName -}}
83
83
// // and then make assertions.
84
84
//
85
85
// }
86
- type {{.MockName}}
86
+ type {{.MockName}}
87
87
{{- if .TypeParams -}}
88
88
[{{- range $index, $param := .TypeParams}}
89
89
{{- if $index}}, {{end}}{{$param.Name | Exported}} {{$param.TypeString}}
@@ -116,7 +116,7 @@ func (mock *{{$mock.MockName}}
116
116
[{{- range $index, $param := $mock.TypeParams}}
117
117
{{- if $index}}, {{end}}{{$param.Name | Exported}}
118
118
{{- end -}}]
119
- {{- end -}}
119
+ {{- end -}}
120
120
) {{.Name}}({{.ArgList}}) {{.ReturnArgTypeList}} {
121
121
{{- if not $.StubImpl}}
122
122
if mock.{{.Name}}Func == nil {
@@ -166,7 +166,7 @@ func (mock *{{$mock.MockName}}
166
166
[{{- range $index, $param := $mock.TypeParams}}
167
167
{{- if $index}}, {{end}}{{$param.Name | Exported}}
168
168
{{- end -}}]
169
- {{- end -}}
169
+ {{- end -}}
170
170
) {{.Name}}Calls() []struct {
171
171
{{- range .Params}}
172
172
{{.Name | Exported}} {{.TypeString}}
@@ -184,7 +184,13 @@ func (mock *{{$mock.MockName}}
184
184
}
185
185
{{- if $.WithResets}}
186
186
// Reset{{.Name}}Calls reset all the calls that were made to {{.Name}}.
187
- func (mock *{{$mock.MockName}}) Reset{{.Name}}Calls() {
187
+ func (mock *{{$mock.MockName}}
188
+ {{- if $mock.TypeParams -}}
189
+ [{{- range $index, $param := $mock.TypeParams}}
190
+ {{- if $index}}, {{end}}{{$param.Name | Exported}}
191
+ {{- end -}}]
192
+ {{- end -}}
193
+ ) Reset{{.Name}}Calls() {
188
194
mock.lock{{.Name}}.Lock()
189
195
mock.calls.{{.Name}} = nil
190
196
mock.lock{{.Name}}.Unlock()
@@ -193,7 +199,13 @@ func (mock *{{$mock.MockName}}) Reset{{.Name}}Calls() {
193
199
{{end -}}
194
200
{{- if $.WithResets}}
195
201
// ResetCalls reset all the calls that were made to all mocked methods.
196
- func (mock *{{$mock.MockName}}) ResetCalls() {
202
+ func (mock *{{$mock.MockName}}
203
+ {{- if $mock.TypeParams -}}
204
+ [{{- range $index, $param := $mock.TypeParams}}
205
+ {{- if $index}}, {{end}}{{$param.Name | Exported}}
206
+ {{- end -}}]
207
+ {{- end -}}
208
+ ) ResetCalls() {
197
209
{{- range .Methods}}
198
210
mock.lock{{.Name}}.Lock()
199
211
mock.calls.{{.Name}} = nil
0 commit comments