aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/alldocs.go
diff options
context:
space:
mode:
authorqiulaidongfeng <2645477756@qq.com>2024-05-09 22:11:00 +0000
committerMichael Matloob <matloob@golang.org>2024-05-16 14:34:32 +0000
commit6cd066f8b22290a1737a19d25f5dd899f720180a (patch)
tree026ef322ae14cbd3cd6f37be0b14302d57a501bb /src/cmd/go/alldocs.go
parentd367b2a475e79cdd1f39ccf376098d0566b7dffa (diff)
downloadgo-6cd066f8b22290a1737a19d25f5dd899f720180a.tar.gz
go-6cd066f8b22290a1737a19d25f5dd899f720180a.zip
cmd/go: add -changed to query for non-defaults in the env
Fixes #34208 Change-Id: I8ec2d96262dcd7cbf870f6173690143c54190722 GitHub-Last-Rev: 6543df4784cff1ba5751dc9885ef502e69679118 GitHub-Pull-Request: golang/go#65655 Reviewed-on: https://go-review.googlesource.com/c/go/+/563137 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
Diffstat (limited to 'src/cmd/go/alldocs.go')
-rw-r--r--src/cmd/go/alldocs.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index ad34b8dfcc3..9263be5a6bc 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -456,7 +456,7 @@
//
// Usage:
//
-// go env [-json] [-u] [-w] [var ...]
+// go env [-json] [-changed] [-u] [-w] [var ...]
//
// Env prints Go environment information.
//
@@ -476,6 +476,10 @@
// form NAME=VALUE and changes the default settings
// of the named environment variables to the given values.
//
+// The -changed flag prints only those settings whose effective
+// value differs from the default value that would be obtained in
+// an empty environment with no prior uses of the -w flag.
+//
// For more about environment variables, see 'go help environment'.
//
// # Update packages to use new APIs