Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Always remove self_package import
Browse files Browse the repository at this point in the history
  • Loading branch information
linzhp committed Nov 6, 2019
1 parent 0b73a1d commit b3f88b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mockgen/mockgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ func sanitize(s string) string {
}

func (g *generator) Generate(pkg *model.Package, pkgName string, outputPackagePath string) error {
if pkgName != pkg.Name {
if pkgName != pkg.Name && *selfPackage == "" {
// reset outputPackagePath if it's not passed in through -self_package
outputPackagePath = ""
}

Expand Down

0 comments on commit b3f88b9

Please sign in to comment.