Open myshkin5 opened 8 years ago
It might be surprising, but this is actually kind of a difficult problem. I kinda cheat on imports by just shelling out to goimports
, but that causes all sorts of issues with aliased imports. The ideal solution (IMO) would be to strip out the aliases in the mock and just use the standardized package name, but I haven't dug into that enough to see whether or not it's easy yet.
Mock actually ends up being invalid.
Interface:
Generated a mock with
baz
prefixes but no import forbaz
orbar
.