]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: add tool meta-pattern to go help packages
authorConrad Irwin <conrad.irwin@gmail.com>
Sun, 1 Dec 2024 05:08:44 +0000 (22:08 -0700)
committerMichael Matloob <matloob@golang.org>
Fri, 6 Dec 2024 19:36:51 +0000 (19:36 +0000)
For #48429

Change-Id: I6932853c3156a68d099a749431d15d2c37785649
Reviewed-on: https://go-review.googlesource.com/c/go/+/632555
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
Auto-Submit: Sam Thanawalla <samthanawalla@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/cmd/go/alldocs.go
src/cmd/go/internal/help/helpdoc.go

index e0899f62d493f6018405208925c379247f1e70f0..ced43b6d5bb8537831e3e11a9aad84c9159c2d11 100644 (file)
 // If no import paths are given, the action applies to the
 // package in the current directory.
 //
-// There are four reserved names for paths that should not be used
+// There are five reserved names for paths that should not be used
 // for packages to be built with the go tool:
 //
 // - "main" denotes the top-level package in a stand-alone executable.
 // - "cmd" expands to the Go repository's commands and their
 // internal libraries.
 //
+// - "tool" expands to the tools defined in the current module's go.mod file.
+//
 // Package names match against fully-qualified import paths or patterns that
 // match against any number of import paths. For instance, "fmt" refers to the
 // standard library's package fmt, but "http" alone for package http would not
index 2fe247327b1f154bd7e0bb7808f20406d2f38129..a64f980e5ee610a5834a041dc0542fe9acebdc83 100644 (file)
@@ -49,7 +49,7 @@ environment variable (For more details see: 'go help gopath').
 If no import paths are given, the action applies to the
 package in the current directory.
 
-There are four reserved names for paths that should not be used
+There are five reserved names for paths that should not be used
 for packages to be built with the go tool:
 
 - "main" denotes the top-level package in a stand-alone executable.
@@ -64,6 +64,8 @@ Go library.
 - "cmd" expands to the Go repository's commands and their
 internal libraries.
 
+- "tool" expands to the tools defined in the current module's go.mod file.
+
 Package names match against fully-qualified import paths or patterns that
 match against any number of import paths. For instance, "fmt" refers to the
 standard library's package fmt, but "http" alone for package http would not