diff options
| author | Michael Matloob <matloob@golang.org> | 2026-03-30 11:26:00 -0400 |
|---|---|---|
| committer | Michael Matloob <matloob@golang.org> | 2026-03-30 09:03:25 -0700 |
| commit | c961c3db0e2cfff3dc13d2d769116e73e1e0ab6c (patch) | |
| tree | 398268c040aed6fe2063825db038e560a1d591e7 /_content/doc/modules | |
| parent | e2752c0ec3d5bee0ed8431e917223647b666eee1 (diff) | |
| download | go-x-website-c961c3db0e2cfff3dc13d2d769116e73e1e0ab6c.tar.xz | |
_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>
Diffstat (limited to '_content/doc/modules')
| -rw-r--r-- | _content/doc/modules/managing-dependencies.md | 7 |
1 files 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 |
