From 991c85a750574a608daf70330e26070f8cd97bb4 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Sun, 16 Dec 2018 03:14:40 +1100 Subject: [PATCH] cmd/dist: sort gohostos switch entries Sort gohostos switch entries for readability/maintainability. Change-Id: I565b0aee33e8463502faa68eaceea6f7dccca66b Reviewed-on: https://go-review.googlesource.com/c/go/+/154379 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Tobias Klauser --- src/cmd/dist/main.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cmd/dist/main.go b/src/cmd/dist/main.go index bab8ab781ab..ed116e22f6a 100644 --- a/src/cmd/dist/main.go +++ b/src/cmd/dist/main.go @@ -56,6 +56,9 @@ func main() { gohostos = runtime.GOOS switch gohostos { + case "aix": + // uname -m doesn't work under AIX + gohostarch = "ppc64" case "darwin": // Even on 64-bit platform, darwin uname -m prints i386. // We don't support any of the OS X versions that run on 32-bit-only hardware anymore. @@ -72,6 +75,11 @@ func main() { if runtime.GOARCH == "arm" { defaultclang = true } + case "plan9": + gohostarch = os.Getenv("objtype") + if gohostarch == "" { + fatalf("$objtype is unset") + } case "solaris": // Even on 64-bit platform, solaris uname -m prints i86pc. out := run("", CheckExit, "isainfo", "-n") @@ -81,16 +89,8 @@ func main() { if strings.Contains(out, "i386") { gohostarch = "386" } - case "plan9": - gohostarch = os.Getenv("objtype") - if gohostarch == "" { - fatalf("$objtype is unset") - } case "windows": exe = ".exe" - case "aix": - // uname -m doesn't work under AIX - gohostarch = "ppc64" } sysinit()