diff options
author | Russ Cox <rsc@golang.org> | 2019-04-08 11:23:42 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2019-04-23 00:58:08 +0000 |
commit | f0e97546962736fe4aa73b7c7ed590f0134515e1 (patch) | |
tree | d6903cc240c0cdef29bcd0d7fa3b059eab080a17 /src/runtime/extern.go | |
parent | e40dffe55ac0ec40fc325bf9ef03dde297fcc2c0 (diff) | |
download | go-f0e97546962736fe4aa73b7c7ed590f0134515e1.tar.gz go-f0e97546962736fe4aa73b7c7ed590f0134515e1.zip |
cmd/go: add env -w and env -u to set and unset default env vars
Setting environment variables for go command configuration
is too difficult and system-specific. This CL adds go env -w,
to change the default settings more easily, in a portable way.
It also adds go env -u, to unset those changes.
See https://golang.org/design/30411-env for details.
Fixes #30411.
Change-Id: I36e83f55b666459f8f7f482432a4a6ee015da71d
Reviewed-on: https://go-review.googlesource.com/c/go/+/171137
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/runtime/extern.go')
-rw-r--r-- | src/runtime/extern.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/extern.go b/src/runtime/extern.go index e308dd38b1..2917efefa6 100644 --- a/src/runtime/extern.go +++ b/src/runtime/extern.go @@ -136,6 +136,9 @@ that can be blocked in system calls on behalf of Go code; those do not count aga the GOMAXPROCS limit. This package's GOMAXPROCS function queries and changes the limit. +The GORACE variable configures the race detector, for programs built using -race. +See https://golang.org/doc/articles/race_detector.html for details. + The GOTRACEBACK variable controls the amount of output generated when a Go program fails due to an unrecovered panic or an unexpected runtime condition. By default, a failure prints a stack trace for the current goroutine, |