From 2ec648aa8c42d1215ddf59c6a461b21fb6723b74 Mon Sep 17 00:00:00 2001 From: Sean Liao Date: Sun, 12 Mar 2023 10:34:04 +0800 Subject: [PATCH] cmd/go: update help for empty environment variables Fixes #50335 Change-Id: I44b9dc6afa8c70b5cc8c79fb3ebddc3f45d3cef8 Reviewed-on: https://go-review.googlesource.com/c/go/+/475695 Auto-Submit: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Bryan Mills Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor --- src/cmd/go/alldocs.go | 6 +++--- src/cmd/go/internal/help/helpdoc.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 8bcbd3f764..455a0f7536 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -2098,9 +2098,9 @@ // # Environment variables // // The go command and the tools it invokes consult environment variables -// for configuration. If an environment variable is unset, the go command -// uses a sensible default setting. To see the effective setting of the -// variable , run 'go env '. To change the default setting, +// for configuration. If an environment variable is unset or empty, the go +// command uses a sensible default setting. To see the effective setting of +// the variable , run 'go env '. To change the default setting, // run 'go env -w ='. Defaults changed using 'go env -w' // are recorded in a Go environment configuration file stored in the // per-user configuration directory, as reported by os.UserConfigDir. diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go index cf932136b3..03cda98bbf 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -471,9 +471,9 @@ var HelpEnvironment = &base.Command{ Long: ` The go command and the tools it invokes consult environment variables -for configuration. If an environment variable is unset, the go command -uses a sensible default setting. To see the effective setting of the -variable , run 'go env '. To change the default setting, +for configuration. If an environment variable is unset or empty, the go +command uses a sensible default setting. To see the effective setting of +the variable , run 'go env '. To change the default setting, run 'go env -w ='. Defaults changed using 'go env -w' are recorded in a Go environment configuration file stored in the per-user configuration directory, as reported by os.UserConfigDir. -- 2.51.0