File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
### Go command {#go-command}
4
4
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
+
5
28
<!-- go.dev/issue/62067 -->
29
+
6
30
The ` go build ` and ` go install ` commands now accept a ` -json ` flag that reports
7
31
build output and failures as structured JSON output on standard output.
8
32
For details of the reporting format, see ` go help buildjson ` .
You can’t perform that action at this time.
0 commit comments