./foo_test.go:15: undefined: foo.MOCK
./foo_test.go:19: bz.EXPECT undefined (type *foo.Baz has no field or method EXPECT)
./foo_test.go:34: undefined: apps
./foo_test.go:42: undefined: foo.MOCK
I used the "withmock go test", and the package name of the product code and the test code are different.
https://github.com/ilovewchao/withmock-test/tree/master/directory-issue
As the example form the link shows, we will get error message like this:
github.com/ilovewchao/withmock-test/directory-issue_test
./foo_test.go:15: undefined: foo.MOCK ./foo_test.go:19: bz.EXPECT undefined (type *foo.Baz has no field or method EXPECT) ./foo_test.go:34: undefined: apps ./foo_test.go:42: undefined: foo.MOCK
I used the "withmock go test", and the package name of the product code and the test code are different.