Improve comment on type guard in template (#113)

If the user specifies a different package and the mock name is the same
as the interface name, the type guard comment will be of the following
format:

	// Ensure, that MyInterface does implement MyInterface.

So use the $sourcePackagePrefix in the comment.
This commit is contained in:
Suhas Karanth 2019-11-06 08:58:47 +05:30 committed by GitHub
parent 1206bf1e2a
commit 0e0395200a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ var (
{{- end }}
)
// Ensure, that {{.MockName}} does implement {{.InterfaceName}}.
// Ensure, that {{.MockName}} does implement {{$sourcePackagePrefix}}{{.InterfaceName}}.
// If this is not the case, regenerate this file with moq.
var _ {{$sourcePackagePrefix}}{{.InterfaceName}} = &{{.MockName}}{}