]> Cypherpunks repositories - gostls13.git/commit
cmd/go: avoid generating "malformed module path" errors for standard-library paths
authorBryan C. Mills <bcmills@google.com>
Fri, 6 Dec 2019 19:48:26 +0000 (14:48 -0500)
committerBryan C. Mills <bcmills@google.com>
Fri, 6 Dec 2019 20:31:18 +0000 (20:31 +0000)
commit1de31310d9f29f1ccf78f37eb9c7da3fb7867494
tree171786edd238af123b8b0008e0e49c62a506f3e5
parentbf865823baecefbf2996a9b56bdb8b73a387fbc9
cmd/go: avoid generating "malformed module path" errors for standard-library paths

If the path looks like it belongs in GOROOT/src and isn't there, we
should mention that in the error message — instead of the fact
that the path is not a valid module path, which the user likely
already knows.

Fixes #34769
Fixes #35734

Change-Id: I3589336d102e420a5ad3bf246816e29f3cbe6d71
Reviewed-on: https://go-review.googlesource.com/c/go/+/210339
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/go/internal/modload/import.go
src/cmd/go/testdata/script/mod_bad_domain.txt
src/cmd/go/testdata/script/mod_build_info_err.txt
src/cmd/go/testdata/script/mod_goroot_errors.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_tidy_error.txt