Copy env.go from master Go testsuite.
From-SVN: r171752
This commit is contained in:
parent
786a183b15
commit
372776deba
1 changed files with 6 additions and 3 deletions
|
@ -6,7 +6,10 @@
|
|||
|
||||
package main
|
||||
|
||||
import os "os"
|
||||
import (
|
||||
"os"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ga, e0 := os.Getenverror("GOARCH")
|
||||
|
@ -14,8 +17,8 @@ func main() {
|
|||
print("$GOARCH: ", e0.String(), "\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
if ga != "amd64" && ga != "386" && ga != "arm" {
|
||||
print("$GOARCH=", ga, "\n")
|
||||
if ga != runtime.GOARCH {
|
||||
print("$GOARCH=", ga, "!= runtime.GOARCH=", runtime.GOARCH, "\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
xxx, e1 := os.Getenverror("DOES_NOT_EXIST")
|
||||
|
|
Loading…
Add table
Reference in a new issue