cmd/go: adjust documentation mentioning 'go get'

In module-aware mode, 'go get' no longer builds or installs packages.

- 'go generate' explains build commands do not run generate
  commands. 'go get' is no longer a build command, so this CL removes
  mention of it.
- 'go get' will continue to accept build flags, but they're
  ignored. The documentation no longer mentions them, though it does
  mention -x for printing VCS commands.

For #43684

Change-Id: I1eea7241eecf72ba9f98238b729d91cc77ec7665
Reviewed-on: https://go-review.googlesource.com/c/go/+/355209
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 15:51:10 -07:00
parent 6e0adde1e9
commit f8bfdc9eda
3 changed files with 12 additions and 6 deletions

View File

@ -498,7 +498,7 @@
// files. Those commands can run any process but the intent is to
// create or update Go source files.
//
// Go generate is never run automatically by go build, go get, go test,
// Go generate is never run automatically by go build, go test,
// and so on. It must be run explicitly.
//
// Go generate scans the file for directives, which are lines of
@ -644,8 +644,7 @@
//
// See 'go help install' or https://golang.org/ref/mod#go-install for details.
//
// In addition to build flags (listed in 'go help build') 'go get' accepts the
// following flags.
// 'go get' accepts the following flags.
//
// The -t flag instructs get to consider modules needed to build tests of
// packages specified on the command line.
@ -660,6 +659,10 @@
// When the -t and -u flags are used together, get will update
// test dependencies as well.
//
// The -x flag prints commands as they are executed. This is useful for
// debugging version control commands when a module is downloaded directly
// from a repository.
//
// For more about modules, see https://golang.org/ref/mod.
//
// For more about specifying packages, see 'go help packages'.

View File

@ -38,7 +38,7 @@ Generate runs commands described by directives within existing
files. Those commands can run any process but the intent is to
create or update Go source files.
Go generate is never run automatically by go build, go get, go test,
Go generate is never run automatically by go build, go test,
and so on. It must be run explicitly.
Go generate scans the file for directives, which are lines of

View File

@ -83,8 +83,7 @@ current directory. For example:
See 'go help install' or https://golang.org/ref/mod#go-install for details.
In addition to build flags (listed in 'go help build') 'go get' accepts the
following flags.
'go get' accepts the following flags.
The -t flag instructs get to consider modules needed to build tests of
packages specified on the command line.
@ -99,6 +98,10 @@ but changes the default to select patch releases.
When the -t and -u flags are used together, get will update
test dependencies as well.
The -x flag prints commands as they are executed. This is useful for
debugging version control commands when a module is downloaded directly
from a repository.
For more about modules, see https://golang.org/ref/mod.
For more about specifying packages, see 'go help packages'.