aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2025-10-17 16:11:56 -0400
committerAlan Donovan <adonovan@google.com>2025-10-17 14:12:40 -0700
commit80876f4b42c807e0f90eab20a3e8a98ef95f2cb0 (patch)
treebfc394473d256353df4fcb7f0b46f643fe51485c /src
parentb5aefe07e5afe2fd5d49c6a4219cc826b3e4e34e (diff)
downloadgo-80876f4b42c807e0f90eab20a3e8a98ef95f2cb0.tar.xz
cmd/go/internal/vet: tweak help doc
For #71859 Change-Id: I3cea3375bd5adff9486b849e472d29ad8324dd54 Reviewed-on: https://go-review.googlesource.com/c/go/+/712665 Reviewed-by: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Michael Matloob <matloob@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/go/alldocs.go19
-rw-r--r--src/cmd/go/internal/vet/vet.go19
2 files changed, 20 insertions, 18 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index 67c0ecbe8b..46bca7480b 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -501,7 +501,7 @@
//
// go fix [build flags] [-fixtool prog] [fix flags] [packages]
//
-// Fix runs the Go fix tool (cmd/vet) on the named packages
+// Fix runs the Go fix tool (cmd/fix) on the named packages
// and applies suggested fixes.
//
// It supports these flags:
@@ -510,15 +510,14 @@
// instead of applying each fix, print the patch as a unified diff
//
// The -fixtool=prog flag selects a different analysis tool with
-// alternative or additional fixes; see the documentation for go vet's
+// alternative or additional fixers; see the documentation for go vet's
// -vettool flag for details.
//
-// For more about specifying packages, see 'go help packages'.
-//
-// For a list of fixers and their flags, see 'go tool fix help'.
+// The default fix tool is 'go tool fix' or cmd/fix.
+// For help on its fixers and their flags, run 'go tool fix help'.
+// For details of a specific fixer such as 'hostport', see 'go tool fix help hostport'.
//
-// For details of a specific fixer such as 'hostport',
-// see 'go tool fix help hostport'.
+// For more about specifying packages, see 'go help packages'.
//
// The build flags supported by go fix are those that control package resolution
// and execution, such as -C, -n, -x, -v, -tags, and -toolexec.
@@ -2050,10 +2049,12 @@
// Alternative vet tools should be built atop golang.org/x/tools/go/analysis/unitchecker,
// which handles the interaction with go vet.
//
-// For more about specifying packages, see 'go help packages'.
-// For a list of checkers and their flags, see 'go tool vet help'.
+// The default vet tool is 'go tool vet' or cmd/vet.
+// For help on its checkers and their flags, run 'go tool vet help'.
// For details of a specific checker such as 'printf', see 'go tool vet help printf'.
//
+// For more about specifying packages, see 'go help packages'.
+//
// The build flags supported by go vet are those that control package resolution
// and execution, such as -C, -n, -x, -v, -tags, and -toolexec.
// For more about these flags, see 'go help build'.
diff --git a/src/cmd/go/internal/vet/vet.go b/src/cmd/go/internal/vet/vet.go
index f9579d498f..7c79dccd53 100644
--- a/src/cmd/go/internal/vet/vet.go
+++ b/src/cmd/go/internal/vet/vet.go
@@ -54,10 +54,12 @@ can be built and run using these commands:
Alternative vet tools should be built atop golang.org/x/tools/go/analysis/unitchecker,
which handles the interaction with go vet.
-For more about specifying packages, see 'go help packages'.
-For a list of checkers and their flags, see 'go tool vet help'.
+The default vet tool is 'go tool vet' or cmd/vet.
+For help on its checkers and their flags, run 'go tool vet help'.
For details of a specific checker such as 'printf', see 'go tool vet help printf'.
+For more about specifying packages, see 'go help packages'.
+
The build flags supported by go vet are those that control package resolution
and execution, such as -C, -n, -x, -v, -tags, and -toolexec.
For more about these flags, see 'go help build'.
@@ -71,7 +73,7 @@ var CmdFix = &base.Command{
UsageLine: "go fix [build flags] [-fixtool prog] [fix flags] [packages]",
Short: "apply fixes suggested by static checkers",
Long: `
-Fix runs the Go fix tool (cmd/vet) on the named packages
+Fix runs the Go fix tool (cmd/fix) on the named packages
and applies suggested fixes.
It supports these flags:
@@ -80,15 +82,14 @@ It supports these flags:
instead of applying each fix, print the patch as a unified diff
The -fixtool=prog flag selects a different analysis tool with
-alternative or additional fixes; see the documentation for go vet's
+alternative or additional fixers; see the documentation for go vet's
-vettool flag for details.
-For more about specifying packages, see 'go help packages'.
-
-For a list of fixers and their flags, see 'go tool fix help'.
+The default fix tool is 'go tool fix' or cmd/fix.
+For help on its fixers and their flags, run 'go tool fix help'.
+For details of a specific fixer such as 'hostport', see 'go tool fix help hostport'.
-For details of a specific fixer such as 'hostport',
-see 'go tool fix help hostport'.
+For more about specifying packages, see 'go help packages'.
The build flags supported by go fix are those that control package resolution
and execution, such as -C, -n, -x, -v, -tags, and -toolexec.