Commit 8456b070 authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

cmd/go/internal/imports: match solaris files for illumos

Like the android/linux pair, match files with GOOS=solaris if
GOOS=illumos

Follow-up for CL 174457

Fixes #32370
Updates #20603

Change-Id: Id01de8bb3990d7bbb22f735a4abed2b3cf8b4062
Reviewed-on: https://go-review.googlesource.com/c/go/+/179997
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBenny Siegert <bsiegert@gmail.com>
Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
parent 769fda2d
......@@ -138,6 +138,9 @@ func matchTag(name string, tags map[string]bool, want bool) bool {
if name == "linux" {
have = have || tags["android"]
}
if name == "solaris" {
have = have || tags["illumos"]
}
return have == want
}
......@@ -152,7 +155,9 @@ func matchTag(name string, tags map[string]bool, want bool) bool {
// name_$(GOARCH)_test.*
// name_$(GOOS)_$(GOARCH)_test.*
//
// An exception: if GOOS=android, then files with GOOS=linux are also matched.
// Exceptions:
// if GOOS=android, then files with GOOS=linux are also matched.
// if GOOS=illumos, then files with GOOS=solaris are also matched.
//
// If tags["*"] is true, then MatchFile will consider all possible
// GOOS and GOARCH to be available and will consequently
......
// +build illumos
package illumos
import _ "e"
// +build solaris
package illumos
import _ "f"
// +build !illumos
package illumos
import _ "g"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment