From 33125b41d9f6bc2d7714efe659ca3f19f4655b97 Mon Sep 17 00:00:00 2001 From: Brian Tiger Chow <734339+btc@users.noreply.github.com> Date: Tue, 22 May 2018 18:58:57 +0000 Subject: [PATCH] fix import issue (#16) * fix import issue * fix shadowing issue --- gatherer.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gatherer.go b/gatherer.go index d889b8c..24df68b 100644 --- a/gatherer.go +++ b/gatherer.go @@ -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()