aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modload/vendor.go
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2021-01-07 11:14:06 -0500
committerJay Conrod <jayconrod@google.com>2021-01-08 20:19:51 +0000
commit6192b9875128c5f53a69b959d5a1abf0f10ae93f (patch)
treec39777eb78c5c3309578cd8bd7758989fd9901ac /src/cmd/go/internal/modload/vendor.go
parent25886cf4bd28be373afb80a4c068a785b43bdddf (diff)
downloadgo-6192b9875128c5f53a69b959d5a1abf0f10ae93f.tar.gz
go-6192b9875128c5f53a69b959d5a1abf0f10ae93f.zip
cmd/go: make hints in error messages more consistent
* All commands the user can run to fix the problem now appear alone on a separate line after a tab. * Removed -d from 'go get' commands. * Replaced 'go mod tidy' with 'go mod download $modpath' when a package might be provided by a module missing a sum. * Errors about 'path@version' syntax are more explicit. Fixes #29415 Fixes #42087 Fixes #43430 Fixes #43523 Change-Id: I4427c2c4506a727a2c727d652fd2d506bb134d3b Reviewed-on: https://go-review.googlesource.com/c/go/+/282121 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/internal/modload/vendor.go')
-rw-r--r--src/cmd/go/internal/modload/vendor.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/modload/vendor.go b/src/cmd/go/internal/modload/vendor.go
index 80d49053c6..d8fd91f1fe 100644
--- a/src/cmd/go/internal/modload/vendor.go
+++ b/src/cmd/go/internal/modload/vendor.go
@@ -214,6 +214,6 @@ func checkVendorConsistency() {
}
if vendErrors.Len() > 0 {
- base.Fatalf("go: inconsistent vendoring in %s:%s\n\nrun 'go mod vendor' to sync, or use -mod=mod or -mod=readonly to ignore the vendor directory", modRoot, vendErrors)
+ base.Fatalf("go: inconsistent vendoring in %s:%s\n\n\tTo ignore the vendor directory, use -mod=readonly or -mod=mod.\n\tTo sync the vendor directory, run:\n\t\tgo mod vendor", modRoot, vendErrors)
}
}