mirror of
https://github.com/golang/go
synced 2024-11-06 06:36:20 -07:00
b95d332c7e
This CL updates test/run.go to compile xxx.dir/x.go with a package path of "test/x" instead of just "x". This prevents collisions with standard library packages. It also requires updating a handful of tests to account for the updated package paths. Fixes #25693. Change-Id: I49208c56ab3cb229ed667d547cd6e004d2175fcf Reviewed-on: https://go-review.googlesource.com/c/go/+/395258 Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
14 lines
310 B
Go
14 lines
310 B
Go
package y
|
|
|
|
import _ "unsafe"
|
|
|
|
//go:linkname byteIndex test/linkname1.indexByte
|
|
func byteIndex(xs []byte, b byte) int // ERROR "leaking param: xs"
|
|
|
|
func ContainsSlash(data []byte) bool { // ERROR "leaking param: data" "can inline ContainsSlash"
|
|
if byteIndex(data, '/') != -1 {
|
|
return true
|
|
}
|
|
return false
|
|
}
|