Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 4b5f250

Browse files
committed
Merge pull request #109 from erggo/master
Fixes GcImport move.
2 parents ce36773 + e367d67 commit 4b5f250

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

exports.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"bufio"
99
"bytes"
1010
"code.google.com/p/go.tools/go/exact"
11+
"code.google.com/p/go.tools/go/gcimporter"
1112
"code.google.com/p/go.tools/go/types"
1213
"fmt"
1314
"go/ast"
@@ -88,15 +89,15 @@ func (c *importer) Import(imports map[string]*types.Package, path string) (pkg *
8889
}
8990
}
9091
}
91-
pkg, err = types.GcImportData(imports, pkgfile, path, bufio.NewReader(bytes.NewBuffer(data)))
92+
pkg, err = gcimporter.ImportData(imports, pkgfile, path, bufio.NewReader(bytes.NewBuffer(data)))
9293
}
9394
if pkg == nil || err != nil {
9495
if data != nil {
9596
return nil, fmt.Errorf("Failed to load package %s: %v", path, err)
9697
}
9798
// Package has not been compiled yet, so fall back to
9899
// the standard GcImport.
99-
pkg, err = types.GcImport(imports, path)
100+
pkg, err = gcimporter.Import(imports, path)
100101
}
101102

102103
c.myimports[path] = pkg

0 commit comments

Comments
 (0)