aboutsummaryrefslogtreecommitdiff
path: root/test/env.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2012-02-18 21:18:13 -0800
committerBrad Fitzpatrick <bradfitz@golang.org>2012-02-18 21:18:13 -0800
commitefacb2a1b48df1a389289c045754ddb30f1a4038 (patch)
treebcc5eca8582a5e3f6ec9ed34e073d2c4914bfd82 /test/env.go
parent83feedf7bf7147021761fd8b5a2a157095fcabc9 (diff)
downloadgo-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.go12
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)
}
}