Skip to content

Commit

Permalink
fix import issue (#16)
Browse files Browse the repository at this point in the history
* fix import issue

* fix shadowing issue
  • Loading branch information
btc authored May 22, 2018
1 parent a7e273b commit 33125b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gatherer.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ func (g *gatherer) Generate(f *generator.FileDescriptor) {
}

func (g *gatherer) hydratePackage(f *generator.FileDescriptor, comments map[string]string) Package {
importPath := goImportPath(g.Generator.Unwrap(), f)
name := string(g.Generator.GoPackageName(importPath))
// TODO(btc): perhaps return error with specific info about failure
importPath, name, found := goPackageOption(f)
if !found {
g.Fail("could not determine import path")
}

g.push("package:" + name)
defer g.pop()
Expand Down

0 comments on commit 33125b4

Please sign in to comment.