diff options
author | Jay Conrod <jayconrod@google.com> | 2021-09-13 10:58:25 -0700 |
---|---|---|
committer | Jay Conrod <jayconrod@google.com> | 2021-09-15 00:06:54 +0000 |
commit | c7f2f51fed15b410dea5f608420858b401887d0a (patch) | |
tree | 806a02a12def7c05fddce4aac821d686503bac92 /src/cmd/go/testdata/script/mod_tidy_too_new.txt | |
parent | 0bb40b08c4884952d7facce3135ff9e50847763f (diff) | |
download | go-c7f2f51fed15b410dea5f608420858b401887d0a.tar.gz go-c7f2f51fed15b410dea5f608420858b401887d0a.zip |
cmd/go: remove subcommand prefix from error messages
For example, errors that started before with "go mod download: " now
start with "go: " instead.
Previously, we had a mix of errors with and without subcommand
prefixes, even in packages like modload that ostensibly aren't tied
to any specific command. This change makes usage more consistent,
which makes refactoring much easier.
These prefixes didn't add useful information: the user should know the
subcommand they just ran. But see CL 347152 for an attempt at making
the opposite change: always printing the subcommand prefix.
Note that there are a number of errors that don't start with "go: " or
any subcommand prefix. This CL doesn't affect those.
Change-Id: I16430d8c39ea3f4d0870f55a5205f06fb21943c0
Reviewed-on: https://go-review.googlesource.com/c/go/+/349597
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>
Diffstat (limited to 'src/cmd/go/testdata/script/mod_tidy_too_new.txt')
-rw-r--r-- | src/cmd/go/testdata/script/mod_tidy_too_new.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/go/testdata/script/mod_tidy_too_new.txt b/src/cmd/go/testdata/script/mod_tidy_too_new.txt index b9c53b510d..8c34a997c9 100644 --- a/src/cmd/go/testdata/script/mod_tidy_too_new.txt +++ b/src/cmd/go/testdata/script/mod_tidy_too_new.txt @@ -9,7 +9,7 @@ cp go.mod go.mod.orig # would look like. ! go mod tidy -stderr 'go mod tidy: go.mod file indicates go 2000.0, but maximum supported version is '$goversion'$' +stderr 'go: go.mod file indicates go 2000.0, but maximum version supported by tidy is '$goversion'$' cmp go.mod go.mod.orig @@ -18,7 +18,7 @@ cmp go.mod go.mod.orig cp go.mod.orig go.mod go mod tidy -e -stderr 'go mod tidy: go.mod file indicates go 2000.0, but maximum supported version is '$goversion'$' +stderr 'go: go.mod file indicates go 2000.0, but maximum version supported by tidy is '$goversion'$' cmp go.mod go.mod.tidy |