From 7f992c627d3c76b941870c524f210c4d256ff0ab Mon Sep 17 00:00:00 2001 From: Carl Sverre Date: Tue, 28 Nov 2017 15:31:38 -0800 Subject: [PATCH] import from source --- stringer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stringer.go b/stringer.go index ccfb304..a9273e9 100644 --- a/stringer.go +++ b/stringer.go @@ -273,7 +273,7 @@ func (g *Generator) parsePackage(directory string, names []string, text interfac // check type-checks the package. The package must be OK to proceed. func (pkg *Package) check(fs *token.FileSet, astFiles []*ast.File) { pkg.defs = make(map[*ast.Ident]types.Object) - config := types.Config{Importer: importer.Default(), FakeImportC: true} + config := types.Config{Importer: importer.For("source", nil), FakeImportC: true} info := &types.Info{ Defs: pkg.defs, }