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 | e021bb43c56cfc63bd5a9b1e9b0dd36c20274ff1 (patch) | |
tree | b612a45ea7227f9cb1fb6a7e9f0e500b08516ca4 /test/env.go | |
parent | 8959e115cf0cf462d71ffe83fe195bf3ba5bf1cf (diff) | |
download | go-e021bb43c56cfc63bd5a9b1e9b0dd36c20274ff1.tar.gz |
os: remove Getenverror
Fixes issue 3065
R=golang-dev, dsymonds, rsc
CC=golang-dev
http://codereview.appspot.com/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 4dcf4443a..972374679 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) } } |