1
0
mirror of https://github.com/golang/go synced 2024-11-26 07:17:59 -07:00

cmd/go/testdata/script: fix test failing on nocgo builders

The regression test introduced in https://golang.org/cl/318770 broke the
the nocgo builders.

Update the cgo package used in the test to ensure that it can be build
both with cgo enabled and disabled.

Change-Id: Iab0486f0b85ac5e5a22fdf8a1998edd50cbb4d96
Reviewed-on: https://go-review.googlesource.com/c/go/+/319210
Trust: Bryan C. Mills <bcmills@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Manlio Perillo 2021-05-12 15:16:20 +02:00 committed by Bryan C. Mills
parent 1a0ea1a08b
commit 485474d204

View File

@ -33,6 +33,16 @@ func F() {
println(C.INT_MAX)
}
-- cgo/pkg_notcgo.go --
//go:build !cgo
// +build !cgo
package cgopkg
func F() {
println(0)
}
-- swig/pkg.go --
package swigpkg