diff --git a/enumer b/enumer deleted file mode 100755 index 0339fa9..0000000 Binary files a/enumer and /dev/null differ diff --git a/stringer.go b/stringer.go index 38891c4..b5c1a01 100644 --- a/stringer.go +++ b/stringer.go @@ -64,7 +64,9 @@ import ( "fmt" "go/ast" "go/build" + exact "go/constant" "go/format" + "go/importer" "go/parser" "go/token" "go/types" @@ -74,10 +76,6 @@ import ( "path/filepath" "sort" "strings" - - exact "go/constant" - - _ "go/importer" ) var ( @@ -270,7 +268,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{FakeImportC: true} + config := types.Config{Importer: importer.Default(), FakeImportC: true} info := &types.Info{ Defs: pkg.defs, }