hel icon indicating copy to clipboard operation
hel copied to clipboard

Panic when generating mock in different package

Open myshkin5 opened this issue 9 years ago • 1 comments

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)
}

myshkin5 avatar Feb 10 '16 17:02 myshkin5

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.

nelsam avatar Feb 13 '16 20:02 nelsam