_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>
diff --git a/_content/doc/modules/managing-dependencies.md b/_content/doc/modules/managing-dependencies.md
index 7752dd8..802e9c3 100644
--- a/_content/doc/modules/managing-dependencies.md
+++ b/_content/doc/modules/managing-dependencies.md
@@ -166,7 +166,7 @@
- `test` -- You can use `test` as a module path prefix for a module whose code
is designed to locally test functions in another module.
-
+
Use the `test` path prefix for modules that are created as part of a test.
For example, your test itself might run `go mod init test` and then set up
that module in some particular way in order to test with a Go source code
@@ -370,7 +370,7 @@
```
$ go mod edit -replace=example.com/theirmodule@v0.0.0-unpublished=../theirmodule
-$ go get -d example.com/theirmodule@v0.0.0-unpublished
+$ go get example.com/theirmodule@v0.0.0-unpublished
```
**Note:** When you use the replace directive, Go tools don't authenticate
diff --git a/_content/ref/mod.md b/_content/ref/mod.md
index 5abeabe..494a19e 100644
--- a/_content/ref/mod.md
+++ b/_content/ref/mod.md
@@ -124,7 +124,7 @@
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 @@
(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 @@
```
# 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`