aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2023-03-14 14:25:56 -0400
committerRuss Cox <rsc@golang.org>2023-04-18 13:19:19 +0000
commit14ab998f95b53baa6e336c598b0f34e319cc9717 (patch)
tree153dfe7575c56668f0668441442cf0a581269778 /misc
parent44e51e60acb8a1ff6ba10d698615fde98b2b28b0 (diff)
downloadgo-14ab998f95b53baa6e336c598b0f34e319cc9717.tar.gz
go-14ab998f95b53baa6e336c598b0f34e319cc9717.zip
cmd/go: add check for unknown godebug setting
A //go:debug line mentioning an unknown or retired setting should be diagnosed as making the program invalid. Do that. We agreed on this in the proposal but I forgot to implement it. Change-Id: Ie69072a1682d4eeb6866c02adbbb426f608567c4 Reviewed-on: https://go-review.googlesource.com/c/go/+/476280 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/cgo/testshared/shared_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/cgo/testshared/shared_test.go b/misc/cgo/testshared/shared_test.go
index e300e20e20..3a8fda05ed 100644
--- a/misc/cgo/testshared/shared_test.go
+++ b/misc/cgo/testshared/shared_test.go
@@ -219,7 +219,7 @@ func cloneGOROOTDeps(goroot string) error {
for _, pkg := range pkgs {
parentFound := false
for _, prev := range pkgRoots {
- if strings.HasPrefix(pkg, prev) {
+ if pkg == prev || strings.HasPrefix(pkg, prev+"/") {
// We will copy in the source for pkg when we copy in prev.
parentFound = true
break