1
0
mirror of https://github.com/golang/go synced 2024-10-04 17:21:20 -06:00
Commit Graph

5 Commits

Author SHA1 Message Date
Brad Fitzpatrick
ec87dbf913 os: eradicate smallpox after test
Otherwise:

$ go test  -short -cpu=1,1,2,2
--- FAIL: TestLookupEnv (0.00s)
        env_test.go:102: SMALLPOX="virus"
--- FAIL: TestLookupEnv-2 (0.00s)
        env_test.go:102: SMALLPOX="virus"
--- FAIL: TestLookupEnv-2 (0.00s)
        env_test.go:102: SMALLPOX="virus"

Change-Id: Ic1f6dd1bae3c79c4f7da02bc8c30b5e599627a82
Reviewed-on: https://go-review.googlesource.com/9794
Reviewed-by: Rob Pike <r@golang.org>
2015-05-06 17:38:57 +00:00
Rob Pike
072a26331a os: rewrite LookupEnv's test
GOROOT is not dependably set.

When I first wrote this test, I thought it was a waste of time
because the function can't fail if the other environment functions
work, but I didn't want to add functionality without testing it.
Of course, the test broke, and I learned something: GOROOT is not
set on iOS or, to put it more broadly, the world continues to
surprise me with its complexity and horror, such as a version of
cat with syntax coloring.

In that vein, I built this test around smallpox.

Change-Id: Ifa6c218a927399d05c47954fdcaea1015e558fb6
Reviewed-on: https://go-review.googlesource.com/9791
Reviewed-by: Russ Cox <rsc@golang.org>
2015-05-06 16:02:32 +00:00
Rob Pike
e8c0d0f2f3 os: add LookupEnv, like Getenv but reports presence
Fixes #9676.

Change-Id: I32fe474cdfa09aff91daa4b10ac4df28ffdaa649
Reviewed-on: https://go-review.googlesource.com/9741
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-05-05 21:05:12 +00:00
Brad Fitzpatrick
85cdc49e8a os, syscall: add Unsetenv
Also address a TODO, making Clearenv pass through to cgo.

Based largely on Minux's earlier https://golang.org/cl/82040044

Fixes #6423

LGTM=iant, alex.brainman, r, rsc
R=rsc, iant, r, alex.brainman
CC=golang-codereviews
https://golang.org/cl/148370043
2014-10-01 11:17:15 -07:00
Russ Cox
c007ce824d build: move package sources from src/pkg to src
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
2014-09-08 00:08:51 -04:00