mirror of
https://github.com/golang/go.git
synced 2025-05-16 21:04:38 +00:00
cmd/compile: document reserved import paths
Fixes #20708. Change-Id: I2db450947b64b8b5af3822c7fbcc3e99746ae9d7 Reviewed-on: https://go-review.googlesource.com/87496 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
c13e0e8cee
commit
8554fd6e7d
@ -1974,6 +1974,11 @@ func addinit(n *Node, init []*Node) *Node {
|
|||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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{
|
var reservedimports = []string{
|
||||||
"go",
|
"go",
|
||||||
"type",
|
"type",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user