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

No way to have a test only package pull in interfaces

poy opened this issue · comments

Say we have an integration test package that requires a mock from an interface. Hel does not analyze the test code at all.

I think I would would want to use the:

//go:generate hel --type somepackage.Foo --output mock_foo_test.go

syntax to indicate that I would want a certain mock.

Blargh.

I mean, I fully understand the pain, but I kinda hate supporting this. I just know someone's going to start using it to justify using that pattern we hate.

That said, I don't have a better solution. I just don't. I'm probably going to have to support this. Le sigh.