Open petergtz opened 6 years ago
Given there is a
type CamelCaseType string
in display.go, then
display.go
cd generate_test_mocks/gomock_source/ ginkgo
will produce:
package matchers import ( "reflect" "github.com/petergtz/pegomock" "" ) func AnyCamelCaseType() CamelCaseType { pegomock.RegisterMatcher(pegomock.NewAnyMatcher(reflect.TypeOf((*(CamelCaseType))(nil)).Elem())) var nullValue CamelCaseType return nullValue } func EqCamelCaseType(value CamelCaseType) CamelCaseType { pegomock.RegisterMatcher(&pegomock.EqMatcher{Value: value}) var nullValue CamelCaseType return nullValue }
i.e. an empty import.
Maybe the GoMock source parsing should be abandoned any favor of the xtools method.
Given there is a
in
display.go
, thenwill produce:
i.e. an empty import.
Maybe the GoMock source parsing should be abandoned any favor of the xtools method.