diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2012-02-18 21:18:13 -0800 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2012-02-18 21:18:13 -0800 |
commit | efacb2a1b48df1a389289c045754ddb30f1a4038 (patch) | |
tree | bcc5eca8582a5e3f6ec9ed34e073d2c4914bfd82 /test/env.go | |
parent | 83feedf7bf7147021761fd8b5a2a157095fcabc9 (diff) | |
download | go-efacb2a1b48df1a389289c045754ddb30f1a4038.tar.gz go-efacb2a1b48df1a389289c045754ddb30f1a4038.zip |
os: remove Getenverror
Fixes #3065
R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5675094
Diffstat (limited to 'test/env.go')
-rw-r--r-- | test/env.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/test/env.go b/test/env.go index 4dcf4443a7..972374679a 100644 --- a/test/env.go +++ b/test/env.go @@ -15,18 +15,14 @@ import ( ) func main() { - ga, e0 := os.Getenverror("GOARCH") - if e0 != nil { - print("$GOARCH: ", e0.Error(), "\n") - os.Exit(1) - } + ga := os.Getenv("GOARCH") if ga != runtime.GOARCH { print("$GOARCH=", ga, "!= runtime.GOARCH=", runtime.GOARCH, "\n") os.Exit(1) } - xxx, e1 := os.Getenverror("DOES_NOT_EXIST") - if e1 != os.ENOENV { - print("$DOES_NOT_EXIST=", xxx, "; err = ", e1.Error(), "\n") + xxx := os.Getenv("DOES_NOT_EXIST") + if xxx != "" { + print("$DOES_NOT_EXIST=", xxx, "\n") os.Exit(1) } } |