From bcd8161f4e3225899981d63def53fbb09b7556d4 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Wed, 8 Mar 2023 19:00:51 +0800 Subject: [PATCH] cmd/go: unify the format of the go help xxx command Fixes #58871 Updates #58871 Change-Id: I947b71083e9559859b3ae6e17b5daad03a976707 Reviewed-on: https://go-review.googlesource.com/c/go/+/474375 Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui Reviewed-by: Bryan Mills Auto-Submit: Bryan Mills --- src/cmd/go/alldocs.go | 5 ++++- src/cmd/go/internal/get/get.go | 2 ++ src/cmd/go/internal/work/build.go | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 523540869a3..ca676d5a88f 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -758,7 +758,8 @@ // Setting GODEBUG=installgoroot=all restores the use of // $GOROOT/pkg/$GOOS_$GOARCH. // -// For more about the build flags, see 'go help build'. +// For more about build flags, see 'go help build'. +// // For more about specifying packages, see 'go help packages'. // // See also: go build, go get, go clean. @@ -2552,6 +2553,8 @@ // // Get never checks out or updates code stored in vendor directories. // +// For more about build flags, see 'go help build'. +// // For more about specifying packages, see 'go help packages'. // // For more about how 'go get' finds source code to diff --git a/src/cmd/go/internal/get/get.go b/src/cmd/go/internal/get/get.go index 1c1f10354ba..c680dead0f7 100644 --- a/src/cmd/go/internal/get/get.go +++ b/src/cmd/go/internal/get/get.go @@ -69,6 +69,8 @@ it also updates any git submodules referenced by the repository. Get never checks out or updates code stored in vendor directories. +For more about build flags, see 'go help build'. + For more about specifying packages, see 'go help packages'. For more about how 'go get' finds source code to diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go index 68c780db7ea..5a1915afb58 100644 --- a/src/cmd/go/internal/work/build.go +++ b/src/cmd/go/internal/work/build.go @@ -602,7 +602,8 @@ Starting in Go 1.20, the standard library is built and cached but not installed. Setting GODEBUG=installgoroot=all restores the use of $GOROOT/pkg/$GOOS_$GOARCH. -For more about the build flags, see 'go help build'. +For more about build flags, see 'go help build'. + For more about specifying packages, see 'go help packages'. See also: go build, go get, go clean.