From 14ab998f95b53baa6e336c598b0f34e319cc9717 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 14 Mar 2023 14:25:56 -0400 Subject: 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 Reviewed-by: Bryan Mills TryBot-Result: Gopher Robot --- misc/cgo/testshared/shared_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc') 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 -- cgit v1.2.3-54-g00ecf