aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Aszalos <gabriel.aszalos@gmail.com>2017-11-03 09:40:52 +0100
committerRuss Cox <rsc@golang.org>2017-11-03 15:52:40 +0000
commitd6ebbef89de401199f729f2d70239f3e09460164 (patch)
tree8cf0d881bde0738edac72d8f91505dcd942aa93c /src
parent39de58bad70b2aca9f7c874b64a8180307503ee4 (diff)
downloadgo-d6ebbef89de401199f729f2d70239f3e09460164.tar.xz
runtime: clarify GOROOT return value in documentation
The current GOROOT documentation could indicate that changing the environment variable at runtime would affect the return value of GOROOT. This is false as the returned value is the one used for the build. This CL aims to clarify the confusion. Fixes #22302 Change-Id: Ib68c30567ac864f152d2da31f001a98531fc9757 Reviewed-on: https://go-review.googlesource.com/75751 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/extern.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/extern.go b/src/runtime/extern.go
index 6e6c674d96..66b9527802 100644
--- a/src/runtime/extern.go
+++ b/src/runtime/extern.go
@@ -212,8 +212,8 @@ func Callers(skip int, pc []uintptr) int {
return callers(skip, pc)
}
-// GOROOT returns the root of the Go tree.
-// It uses the GOROOT environment variable, if set,
+// GOROOT returns the root of the Go tree. It uses the
+// GOROOT environment variable, if set at process start,
// or else the root used during the Go build.
func GOROOT() string {
s := gogetenv("GOROOT")