From 0e0395200ade5af7742211b863bc1eb1e12b2594 Mon Sep 17 00:00:00 2001 From: Suhas Karanth Date: Wed, 6 Nov 2019 08:58:47 +0530 Subject: [PATCH] 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. --- pkg/moq/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/moq/template.go b/pkg/moq/template.go index 243559c..bc33de2 100644 --- a/pkg/moq/template.go +++ b/pkg/moq/template.go @@ -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}}{}