{GOOS: "linux", GOARCH: "amd64"},
{GOOS: "linux", GOARCH: "arm", CgoEnabled: true},
{GOOS: "linux", GOARCH: "arm"},
- {GOOS: "darwin", GOARCH: "386", CgoEnabled: true},
- {GOOS: "darwin", GOARCH: "386"},
{GOOS: "darwin", GOARCH: "amd64", CgoEnabled: true},
{GOOS: "darwin", GOARCH: "amd64"},
{GOOS: "windows", GOARCH: "amd64"},
return spaceParensRx.ReplaceAllString(f, "")
}
+// portRemoved reports whether the given port-specific API feature is
+// okay to no longer exist because its port was removed.
+func portRemoved(feature string) bool {
+ return strings.Contains(feature, "(darwin-386)") ||
+ strings.Contains(feature, "(darwin-386-cgo)")
+}
+
func compareAPI(w io.Writer, features, required, optional, exception []string, allowAdd bool) (ok bool) {
ok = true
// acknowledged by being in the file
// "api/except.txt". No need to print them out
// here.
+ } else if portRemoved(feature) {
+ // okay.
} else if featureSet[featureWithoutContext(feature)] {
// okay.
} else {
tg.grepStdout("linux amd64", "unexpected GOOS/GOARCH combination")
tg.setenv("GOOS", "darwin")
- tg.setenv("GOARCH", "386")
+ tg.setenv("GOARCH", "arm64")
tg.run("generate", "gen")
- tg.grepStdout("darwin 386", "unexpected GOOS/GOARCH combination")
+ tg.grepStdout("darwin arm64", "unexpected GOOS/GOARCH combination")
}
func TestGoEnv(t *testing.T) {