Add import, if source pkg is not destination pkg

Fixes #86
This commit is contained in:
Lucas Bremgartner 2019-01-22 21:40:29 +01:00
parent 39f6db0ed3
commit 81c463c9b9

View File

@ -174,6 +174,7 @@ func (m *Mocker) Mock(w io.Writer, name ...string) error {
if tpkg.Name() != m.pkgName {
doc.SourcePackagePrefix = tpkg.Name() + "."
doc.Imports = append(doc.Imports, tpkg.Path())
}
var buf bytes.Buffer