// Package gcimporter implements Import for gc-generated object files.
// Importing this package installs Import as go/types.DefaultImport.
-package gcimporter // import "go/types/internal/gcimporter"
+package gcimporter // import "go/internal/gcimporter"
import (
"bufio"
# copy $f and update imports
sed -e 's|"golang.org/x/tools/go/exact"|"go/exact"|' \
-e 's|"golang.org/x/tools/go/types"|"go/types"|' \
- -e 's|"golang.org/x/tools/go/gcimporter"|"go/types/internal/gcimporter"|' \
+ -e 's|"golang.org/x/tools/go/gcimporter"|"go/internal/gcimporter"|' \
$f | gofmt > tmp.go
mv -f tmp.go `basename $f`
done
install types
### go/gcimporter
-vendor go/gcimporter types/internal/gcimporter
-test types/internal/gcimporter
-install types/internal/gcimporter
+vendor go/gcimporter internal/gcimporter
+test internal/gcimporter
+install internal/gcimporter
### test go/types (requires gcimporter)
test types
// DefaultImport is the default importer invoked if Config.Import == nil.
// The declaration:
//
-// import _ "go/types/internal/gcimporter"
+// import _ "go/internal/gcimporter"
//
// in a client of go/types will initialize DefaultImport to gcimporter.Import.
var DefaultImport Importer
"strings"
"testing"
+ _ "go/internal/gcimporter"
. "go/types"
- _ "go/types/internal/gcimporter"
)
// skipSpecialPlatforms causes the test to be skipped for platforms where
"go/parser"
"testing"
+ _ "go/internal/gcimporter"
. "go/types"
- _ "go/types/internal/gcimporter"
)
var builtinCalls = []struct {
"strings"
"testing"
+ _ "go/internal/gcimporter"
. "go/types"
- _ "go/types/internal/gcimporter"
)
var (
"strings"
"testing"
+ _ "go/internal/gcimporter"
. "go/types"
- _ "go/types/internal/gcimporter"
)
func testEval(t *testing.T, pkg *Package, scope *Scope, str string, typ Type, typStr, valStr string) {
"strings"
"testing"
+ _ "go/internal/gcimporter"
. "go/types"
- _ "go/types/internal/gcimporter"
)
func TestIssue5770(t *testing.T) {
} else {
// Panic if we encounter an import.
importer = func(map[string]*Package, string) (*Package, error) {
- panic(`no Config.Import or DefaultImport (missing import _ "go/types/internal/gcimporter"?)`)
+ panic(`no Config.Import or DefaultImport (missing import _ "go/internal/gcimporter"?)`)
}
}
}
"sort"
"testing"
+ _ "go/internal/gcimporter"
. "go/types"
- _ "go/types/internal/gcimporter"
)
var sources = []string{
"testing"
"time"
+ _ "go/internal/gcimporter"
. "go/types"
- _ "go/types/internal/gcimporter"
)
var benchmark = flag.Bool("b", false, "run benchmarks")
"testing"
"time"
+ _ "go/internal/gcimporter"
. "go/types"
- _ "go/types/internal/gcimporter"
)
var (
"go/token"
"testing"
+ _ "go/internal/gcimporter"
. "go/types"
- _ "go/types/internal/gcimporter"
)
const filename = "<src>"