_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 <dmitshur@google.com> Reviewed-by: Michael Matloob <matloob@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/_content/doc/modules/managing-dependencies.md b/_content/doc/modules/managing-dependencies.md index 957f31a..06c129f 100644 --- a/_content/doc/modules/managing-dependencies.md +++ b/_content/doc/modules/managing-dependencies.md
@@ -534,9 +534,12 @@ 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