diff options
author | Jay Conrod <jayconrod@google.com> | 2021-03-12 13:48:32 -0500 |
---|---|---|
committer | Dmitri Shuralyov <dmitshur@golang.org> | 2021-03-12 21:52:25 +0000 |
commit | f39c4deee812b577ffb84b78e62ce4392d2baeb1 (patch) | |
tree | d2ac60dd9272356342beb109fe9f6880357779d0 | |
parent | 0da04a662a8e46f688bc65bf4fc5440226babe59 (diff) | |
download | go-f39c4deee812b577ffb84b78e62ce4392d2baeb1.tar.gz go-f39c4deee812b577ffb84b78e62ce4392d2baeb1.zip |
[release-branch.go1.16] cmd/go: fix godoc formatting for text from 'go help install'
Fixes #44860
Change-Id: I5a12c6437a91ce59307483ffcc70e084edc32197
Reviewed-on: https://go-review.googlesource.com/c/go/+/301329
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
(cherry picked from commit 86bbf4beee276b9a7f9a427a9d1a9277bd904709)
Reviewed-on: https://go-review.googlesource.com/c/go/+/301429
-rw-r--r-- | src/cmd/go/alldocs.go | 20 | ||||
-rw-r--r-- | src/cmd/go/internal/work/build.go | 20 |
2 files changed, 24 insertions, 16 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index e7c63f0749..84f89c9d2d 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -692,18 +692,22 @@ // arguments must satisfy the following constraints: // // - Arguments must be package paths or package patterns (with "..." wildcards). -// They must not be standard packages (like fmt), meta-patterns (std, cmd, -// all), or relative or absolute file paths. +// They must not be standard packages (like fmt), meta-patterns (std, cmd, +// all), or relative or absolute file paths. +// // - All arguments must have the same version suffix. Different queries are not -// allowed, even if they refer to the same version. +// allowed, even if they refer to the same version. +// // - All arguments must refer to packages in the same module at the same version. +// // - No module is considered the "main" module. If the module containing -// packages named on the command line has a go.mod file, it must not contain -// directives (replace and exclude) that would cause it to be interpreted -// differently than if it were the main module. The module must not require -// a higher version of itself. +// packages named on the command line has a go.mod file, it must not contain +// directives (replace and exclude) that would cause it to be interpreted +// differently than if it were the main module. The module must not require +// a higher version of itself. +// // - Package path arguments must refer to main packages. Pattern arguments -// will only match main packages. +// will only match main packages. // // If the arguments don't have version suffixes, "go install" may run in // module-aware mode or GOPATH mode, depending on the GO111MODULE environment diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go index 780d639c5d..f024b07b22 100644 --- a/src/cmd/go/internal/work/build.go +++ b/src/cmd/go/internal/work/build.go @@ -482,18 +482,22 @@ To eliminate ambiguity about which module versions are used in the build, the arguments must satisfy the following constraints: - Arguments must be package paths or package patterns (with "..." wildcards). - They must not be standard packages (like fmt), meta-patterns (std, cmd, - all), or relative or absolute file paths. +They must not be standard packages (like fmt), meta-patterns (std, cmd, +all), or relative or absolute file paths. + - All arguments must have the same version suffix. Different queries are not - allowed, even if they refer to the same version. +allowed, even if they refer to the same version. + - All arguments must refer to packages in the same module at the same version. + - No module is considered the "main" module. If the module containing - packages named on the command line has a go.mod file, it must not contain - directives (replace and exclude) that would cause it to be interpreted - differently than if it were the main module. The module must not require - a higher version of itself. +packages named on the command line has a go.mod file, it must not contain +directives (replace and exclude) that would cause it to be interpreted +differently than if it were the main module. The module must not require +a higher version of itself. + - Package path arguments must refer to main packages. Pattern arguments - will only match main packages. +will only match main packages. If the arguments don't have version suffixes, "go install" may run in module-aware mode or GOPATH mode, depending on the GO111MODULE environment |