]> Cypherpunks repositories - gostls13.git/commitdiff
doc/next: introduce module tools
authorConrad Irwin <conrad.irwin@gmail.com>
Sun, 1 Dec 2024 05:13:52 +0000 (22:13 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 5 Dec 2024 18:56:33 +0000 (18:56 +0000)
Fixes #48429

Change-Id: Ie1954fc3bedd7d36cafaf3835b6c3a92326393f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/632556
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
doc/next/3-tools.md

index 93047887e819d851ddde3fbd2e816a55b39c80df..fb71ada5d9c04eee1de39b525483afeaf476e375 100644 (file)
@@ -2,7 +2,31 @@
 
 ### Go command {#go-command}
 
+<!-- go.dev/issue/48429 -->
+
+Go modules can now track executable dependencies using `tool` directives in
+go.mod. This removes the need for the previous workaround of adding tools as
+blank imports to a file conventionally named "tools.go". The `go tool`
+command can now run these tools in addition to tools shipped with the Go
+distribution. For more information see [the
+documentation](/doc/modules/managing-dependencies#tools).
+
+The new `-tool` flag for `go get` causes a tool directive to be added to the
+current module for named packages in addition to adding require directives.
+
+The new [`tool` meta-pattern](/cmd/go#hdr-Package_lists_and_patterns) refers to
+all tools in the current module. This can be used to upgrade them all with `go
+get -u tool` or to install them into your GOBIN directory with `go install
+tool`.
+
+<!-- go.dev/issue/69290 -->
+
+Executables created by `go run` and the new behavior for `go tool` are now
+cached in the Go build cache. This makes repeated executions faster at the
+expense of making the cache larger. See [#69290](/issue/69290).
+
 <!-- go.dev/issue/62067 -->
+
 The `go build` and `go install` commands now accept a `-json` flag that reports
 build output and failures as structured JSON output on standard output.
 For details of the reporting format, see `go help buildjson`.