hel
hel copied to clipboard
Panic when generating mock in different package
We are trying to land the mock in a package other than where the interface is defined.
my_interface.go
package xyz
//go:generate hel -o ../anotherpackage/mock_my_test.go -t MyInterface
type MyInterface interface {
DoSomething() (err error)
}
I've got another potential solution for this. This sort of thing seems to come up when you're forced to use an imported interface type as a function parameter or return value - I can cover that situation by simply automatically generating a mock for those types.