nelsam / hel

Hel rules over Helheim, where the souls unworthy of Valhalla reside. It's also a mock generator for Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ensure that Mocks Use Package Selectors

nelsam opened this issue · comments

If a mock is in a different package than the package containing the interface, some types may need the package name added as a prefix. E.g.

package bacon

type Bar int

type Foo interface {
  Foo() Bar
}

In the above, I'm pretty sure that we need some additional logic to change Foo() Bar to Foo() bacon.Bar if the generated mock is in the bacon_test package.

Update: Yup, this is definitely an issue. It does not automatically handle that.