Skip to content

Commit

Permalink
Add import, if source pkg is not destination pkg
Browse files Browse the repository at this point in the history
Fixes #86
  • Loading branch information
breml committed Jan 22, 2019
1 parent 39f6db0 commit 81c463c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/moq/moq.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 81c463c

Please sign in to comment.