_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 <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
Jay Conrod 2021-10-11 16:22:21 -07:00
Родитель c8768b9a37
Коммит 281050ffdd
4 изменённых файлов: 8 добавлений и 18 удалений

Просмотреть файл

@ -103,7 +103,7 @@ $(document).ready(function() {
<p>This is an <b>unstable</b> version of Go. Use with caution.</p>
<p>If you already have Go installed, you can install this version by running:</p>
<pre>
go get golang.org/dl/{{.Version}}
go install golang.org/dl/{{.Version}}@latest
</pre>
<p>Then, use the <code>{{.Version}}</code> command instead of the <code>go</code> command to use {{.Version}}.</p>
{{end}}

Просмотреть файл

@ -8,9 +8,9 @@
Starting in Go 1.17, installing executables with `go get` is deprecated.
`go install` may be used instead.
In a future Go release, `go get` will no longer build packages; it will only
In Go 1.18, `go get` will no longer build packages; it will only
be used to add, update, or remove dependencies in `go.mod`. Specifically,
`go get` will act as if the `-d` flag were enabled.
`go get` will always act as if the `-d` flag were enabled.
## What to use instead
@ -40,7 +40,7 @@ In order to avoid ambiguity, when `go install` is used with a version suffix,
all arguments must refer to `main` packages in the same module at the same
version. If that module has a `go.mod` file, it must not contain directives like
`replace` or `exclude` that would cause it to be interpreted differently if it
were the main module.
were the main module. The module's `vendor` directory is not used.
See [`go install`](/ref/mod#go-install) for details.

Просмотреть файл

@ -195,7 +195,7 @@ A major version update can be very disruptive to your module's users because it
<h4 id="modules-publishing"><a href="/doc/modules/publishing">Publishing a module</a></h4>
<p>
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.
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>.
</p>
<h4 id="modules-version-numbers"><a href="/doc/modules/version-numbers">Module version numbering</a></h4>

Просмотреть файл

@ -398,19 +398,9 @@ To install one of the tools (<code>godoc</code> in this case):
</p>
<pre>
$ go get golang.org/x/tools/cmd/godoc
$ go install golang.org/x/tools/cmd/godoc@latest
</pre>
<p>
To install these tools, the <code>go</code> <code>get</code> command requires
that <a href="#git">Git</a> be installed locally.
</p>
<p>
You must also have a workspace (<code>GOPATH</code>) set up;
see <a href="/doc/code.html">How to Write Go Code</a> for the details.
</p>
<h2 id="community">Community resources</h2>
<p>
@ -504,8 +494,8 @@ you must set <code>GOPATH</code> to another location to avoid conflicts.
<p>
The directory where executables outside the Go distribution are installed
using the <a href="/cmd/go">go command</a>. For example,
<code>go get golang.org/x/tools/cmd/godoc</code> downloads, builds, and
installs <code>$GOBIN/godoc</code>. By default, <code>$GOBIN</code> is
<code>go install golang.org/x/tools/cmd/godoc@latest</code> downloads, builds,
and installs <code>$GOBIN/godoc</code>. By default, <code>$GOBIN</code> is
<code>$GOPATH/bin</code> (or <code>$HOME/go/bin</code> if <code>GOPATH</code>
is not set). After installing, you will want to add this directory to
your <code>$PATH</code> so you can use installed tools.