Skip to content

Commit 6293a06

Browse files
ConradIrwingopherbot
authored andcommitted
doc/next: introduce module tools
Fixes #48429 Change-Id: Ie1954fc3bedd7d36cafaf3835b6c3a92326393f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/632556 Reviewed-by: Michael Matloob <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent c3a706e commit 6293a06

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/next/3-tools.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,31 @@
22

33
### Go command {#go-command}
44

5+
<!-- go.dev/issue/48429 -->
6+
7+
Go modules can now track executable dependencies using `tool` directives in
8+
go.mod. This removes the need for the previous workaround of adding tools as
9+
blank imports to a file conventionally named "tools.go". The `go tool`
10+
command can now run these tools in addition to tools shipped with the Go
11+
distribution. For more information see [the
12+
documentation](/doc/modules/managing-dependencies#tools).
13+
14+
The new `-tool` flag for `go get` causes a tool directive to be added to the
15+
current module for named packages in addition to adding require directives.
16+
17+
The new [`tool` meta-pattern](/cmd/go#hdr-Package_lists_and_patterns) refers to
18+
all tools in the current module. This can be used to upgrade them all with `go
19+
get -u tool` or to install them into your GOBIN directory with `go install
20+
tool`.
21+
22+
<!-- go.dev/issue/69290 -->
23+
24+
Executables created by `go run` and the new behavior for `go tool` are now
25+
cached in the Go build cache. This makes repeated executions faster at the
26+
expense of making the cache larger. See [#69290](/issue/69290).
27+
528
<!-- go.dev/issue/62067 -->
29+
630
The `go build` and `go install` commands now accept a `-json` flag that reports
731
build output and failures as structured JSON output on standard output.
832
For details of the reporting format, see `go help buildjson`.

0 commit comments

Comments
 (0)