]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: sort gohostos switch entries
authorJoel Sing <joel@sing.id.au>
Sat, 15 Dec 2018 16:14:40 +0000 (03:14 +1100)
committerTobias Klauser <tobias.klauser@gmail.com>
Mon, 18 Mar 2019 19:57:52 +0000 (19:57 +0000)
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 <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
src/cmd/dist/main.go

index bab8ab781ab677e5b0a1ed3f3fade778ff614d0f..ed116e22f6af6e814a826a9abdb8cb2595617b83 100644 (file)
@@ -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()