Skip to content

Commit 281050f

Browse files
author
Jay Conrod
committed
_content: change 'go get' to 'go install' where appropriate
For golang/go#43684 Change-Id: Ifdb0695d15961150960f7be3eb0fb44ac1f0d4d2 Reviewed-on: https://go-review.googlesource.com/c/website/+/355249 Trust: Jay Conrod <[email protected]> Run-TryBot: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
1 parent c8768b9 commit 281050f

File tree

4 files changed

+8
-18
lines changed

4 files changed

+8
-18
lines changed

_content/dl.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ $(document).ready(function() {
103103
<p>This is an <b>unstable</b> version of Go. Use with caution.</p>
104104
<p>If you already have Go installed, you can install this version by running:</p>
105105
<pre>
106-
go get golang.org/dl/{{.Version}}
106+
go install golang.org/dl/{{.Version}}@latest
107107
</pre>
108108
<p>Then, use the <code>{{.Version}}</code> command instead of the <code>go</code> command to use {{.Version}}.</p>
109109
{{end}}

_content/doc/go-get-install-deprecation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
Starting in Go 1.17, installing executables with `go get` is deprecated.
99
`go install` may be used instead.
1010

11-
In a future Go release, `go get` will no longer build packages; it will only
11+
In Go 1.18, `go get` will no longer build packages; it will only
1212
be used to add, update, or remove dependencies in `go.mod`. Specifically,
13-
`go get` will act as if the `-d` flag were enabled.
13+
`go get` will always act as if the `-d` flag were enabled.
1414

1515
## What to use instead
1616

@@ -40,7 +40,7 @@ In order to avoid ambiguity, when `go install` is used with a version suffix,
4040
all arguments must refer to `main` packages in the same module at the same
4141
version. If that module has a `go.mod` file, it must not contain directives like
4242
`replace` or `exclude` that would cause it to be interpreted differently if it
43-
were the main module.
43+
were the main module. The module's `vendor` directory is not used.
4444

4545
See [`go install`](/ref/mod#go-install) for details.
4646

_content/doc/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ <h4 id="modules-major-version"><a href="/doc/modules/major-version">Developing a
195195

196196
<h4 id="modules-publishing"><a href="/doc/modules/publishing">Publishing a module</a></h4>
197197
<p>
198-
When you want to make a module available for other developers, you publish it so that it's visible to Go tools. Once you've published the module, developers importing its packages will be able to resolve a dependency on the module by running commands such as go get.
198+
When you want to make a module available for other developers, you publish it so that it's visible to Go tools. Once you've published the module, developers importing its packages will be able to resolve a dependency on the module by running commands such as <code>go get</code>.
199199
</p>
200200

201201
<h4 id="modules-version-numbers"><a href="/doc/modules/version-numbers">Module version numbering</a></h4>

_content/doc/install/source.html

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -398,19 +398,9 @@ <h2 id="tools">Install additional tools</h2>
398398
</p>
399399

400400
<pre>
401-
$ go get golang.org/x/tools/cmd/godoc
401+
$ go install golang.org/x/tools/cmd/godoc@latest
402402
</pre>
403403

404-
<p>
405-
To install these tools, the <code>go</code> <code>get</code> command requires
406-
that <a href="#git">Git</a> be installed locally.
407-
</p>
408-
409-
<p>
410-
You must also have a workspace (<code>GOPATH</code>) set up;
411-
see <a href="/doc/code.html">How to Write Go Code</a> for the details.
412-
</p>
413-
414404
<h2 id="community">Community resources</h2>
415405

416406
<p>
@@ -504,8 +494,8 @@ <h2 id="environment">Optional environment variables</h2>
504494
<p>
505495
The directory where executables outside the Go distribution are installed
506496
using the <a href="/cmd/go">go command</a>. For example,
507-
<code>go get golang.org/x/tools/cmd/godoc</code> downloads, builds, and
508-
installs <code>$GOBIN/godoc</code>. By default, <code>$GOBIN</code> is
497+
<code>go install golang.org/x/tools/cmd/godoc@latest</code> downloads, builds,
498+
and installs <code>$GOBIN/godoc</code>. By default, <code>$GOBIN</code> is
509499
<code>$GOPATH/bin</code> (or <code>$HOME/go/bin</code> if <code>GOPATH</code>
510500
is not set). After installing, you will want to add this directory to
511501
your <code>$PATH</code> so you can use installed tools.

0 commit comments

Comments
 (0)