diff options
Diffstat (limited to 'src/cmd/compile/internal/noder')
| -rw-r--r-- | src/cmd/compile/internal/noder/import.go | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/cmd/compile/internal/noder/import.go b/src/cmd/compile/internal/noder/import.go index 49b8fd142a..8b017ecfd5 100644 --- a/src/cmd/compile/internal/noder/import.go +++ b/src/cmd/compile/internal/noder/import.go @@ -355,16 +355,6 @@ func addFingerprint(path string, f *os.File, end int64) error { return nil } -// The linker uses the magic symbol prefixes "go." and "type." -// Avoid potential confusion between import paths and symbols -// by rejecting these reserved imports for now. Also, people -// "can do weird things in GOPATH and we'd prefer they didn't -// do _that_ weird thing" (per rsc). See also #4257. -var reservedimports = []string{ - "go", - "type", -} - func checkImportPath(path string, allowSpace bool) error { if path == "" { return errors.New("import path is empty") @@ -374,7 +364,7 @@ func checkImportPath(path string, allowSpace bool) error { return errors.New("import path contains NUL") } - for _, ri := range reservedimports { + for ri := range base.ReservedImports { if path == ri { return fmt.Errorf("import path %q is reserved and cannot be used", path) } |
