From c961c3db0e2cfff3dc13d2d769116e73e1e0ab6c Mon Sep 17 00:00:00 2001 From: Michael Matloob Date: Mon, 30 Mar 2026 11:26:00 -0400 Subject: _content: in managing dependencies doc '-u' flag and mention '-modfile' This CL is based on CL 648578 but without the modfile parts: In the 'go tool' section, we remove the '-u' flag in 'go get -u tool', which could be read as implying the '-u' is needed. This was previously also an issue in the draft 1.24 release notes, which we addressed in CL 638296. Because many gophers persist in thinking the '-u' is required to upgrade a target of 'go get', we also mention that 'go get tool' is equivalent to 'go get tool@upgrade' to help people understand & internalize the meaning of 'go get foo' with no @version suffix. While we are here, s/acheive/achieve/. For golang/go#48423 For golang/go#71663 Change-Id: I50d94b9d815e455f124f1790b13cc3b66a6a6964 Reviewed-on: https://go-review.googlesource.com/c/website/+/761140 Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Matloob LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- _content/doc/modules/managing-dependencies.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/_content/doc/modules/managing-dependencies.md b/_content/doc/modules/managing-dependencies.md index 957f31a1..06c129f0 100644 --- a/_content/doc/modules/managing-dependencies.md +++ b/_content/doc/modules/managing-dependencies.md @@ -534,9 +534,12 @@ pruning, when you depend on a module that itself has a tool dependency, requirements that exist just to satisfy that tool dependency do not usually become requirements of your module. -The `tool` [meta-pattern](/cmd/go#hdr-Package_lists_and_patterns) provides a way to perform operations on all tools simultaneously. For example you can upgrade all tools with `go get -u tool`, or install them all to $GOBIN with `go install tool`. +The `tool` [meta-pattern](/cmd/go#hdr-Package_lists_and_patterns) provides a way to perform operations on all +tools simultaneously. For example you can upgrade all tools with `go get tool`, +which is equivalent to `go get tool@upgrade`, or install them all to $GOBIN +with `go install tool`. -In Go versions before 1.24, you can acheive something similar to a `tool` +In Go versions before 1.24, you can achieve something similar to a `tool` directive by adding a blank import to a go file within the module that is excluded from the build using [build constraints](/pkg/go/build/#hdr-Build_Constraints). If you do this, you can then -- cgit v1.3