diff options
| author | Roger Peppe <rogpeppe@gmail.com> | 2022-10-06 17:38:44 +0100 |
|---|---|---|
| committer | roger peppe <rogpeppe@gmail.com> | 2022-10-06 23:34:32 +0000 |
| commit | ba3d5cf5ff8abac0ae00c452c85efeea6bba6f20 (patch) | |
| tree | 5b24c4f1e6fbf2da6c007bf4602791998babbb8e /_content/ref | |
| parent | 6438748656032e812b5e2c94f837f2a6c86e3c35 (diff) | |
| download | go-x-website-ba3d5cf5ff8abac0ae00c452c85efeea6bba6f20.tar.xz | |
_content/{ref,doc}: remove -d from go get examples
The `-d` flag to `go get` in module mode is a no-op, as witness
the following comment from the code:
// TODO(#43684): in the future (Go 1.20), warn that -d is a no-op.
if !*getD {
base.Fatalf("go: -d flag may not be disabled")
}
Thus it's misleading, so remove it.
Change-Id: I0cf61d61b561d010d00f6044a5c07ca8f3bd117f
Reviewed-on: https://go-review.googlesource.com/c/website/+/439695
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to '_content/ref')
| -rw-r--r-- | _content/ref/mod.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/_content/ref/mod.md b/_content/ref/mod.md index 5abeabe9..494a19e5 100644 --- a/_content/ref/mod.md +++ b/_content/ref/mod.md @@ -124,7 +124,7 @@ this standard into canonical versions. The `go` command will also remove build metadata suffixes (except for `+incompatible`) as part of this process. This may result in a [pseudo-version](#glos-pseudo-version), a pre-release version that encodes a revision identifier (such as a Git commit hash) and a timestamp from a -version control system. For example, the command `go get -d +version control system. For example, the command `go get golang.org/x/net@daa7c041` will convert the commit hash `daa7c041` into the pseudo-version `v0.0.0-20191109021931-daa7c04131f5`. Canonical versions are required outside the main module, and the `go` command will report an error if a @@ -198,7 +198,7 @@ a commit hash or a branch name and will translate it into a pseudo-version (or tagged version if available) automatically. For example: ``` -go get -d example.com/mod@master +go get example.com/mod@master go list -m -json example.com/mod@abcd1234 ``` @@ -1511,20 +1511,20 @@ Examples: ``` # Upgrade a specific module. -$ go get -d golang.org/x/net +$ go get golang.org/x/net # Upgrade modules that provide packages imported by packages in the main module. -$ go get -d -u ./... +$ go get -u ./... # Upgrade or downgrade to a specific version of a module. -$ go get -d golang.org/x/text@v0.3.2 +$ go get golang.org/x/text@v0.3.2 # Update to the commit on the module's master branch. -$ go get -d golang.org/x/text@master +$ go get golang.org/x/text@master # Remove a dependency on a module and downgrade modules that require it # to versions that don't require it. -$ go get -d golang.org/x/text@none +$ go get golang.org/x/text@none ``` The `go get` command updates module dependencies in the [`go.mod` |
