You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(install-guide): update Go 1.24 tool directive usage (#5298)
The previous installation guide relied on tools.go for tracking dependencies.
This update replaces it with the new tool directive introduced in Go 1.24.
Fixes#5254
Copy file name to clipboardExpand all lines: README.md
+42
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,48 @@ This will place four binaries in your `$GOBIN`;
97
97
98
98
Make sure that your `$GOBIN` is in your `$PATH`.
99
99
100
+
### **Using the `tool` Directive in Go 1.24**
101
+
102
+
Starting from Go 1.24, the `tool` directive in `go.mod` provides a structured way to track and manage executable dependencies. This replaces the previous workaround of using a separate `tools.go` file with blank imports.
103
+
104
+
#### **Tracking Tools in `go.mod`**
105
+
106
+
Instead of manually importing tool dependencies in a Go source file, you can now use the `tool` directive in `go.mod` to declare the tools your project depends on. For example:
0 commit comments