]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: fail if no package was found in local module
authorAriel Mashraki <ariel@mashraki.co.il>
Thu, 24 Oct 2019 11:36:57 +0000 (14:36 +0300)
committerBryan C. Mills <bcmills@google.com>
Fri, 8 Nov 2019 20:50:17 +0000 (20:50 +0000)
commit9e914f55dded9f779aae86cfb2e989bc9a1d3ea4
tree285034e795c23097b919665c41ca86986c729060
parentbababde766afe97ff2100c467f416caa28475b18
cmd/go/internal/modload: fail if no package was found in local module

Changing the Import function to return a PackageNotInModuleError if no
package was found in a local module. This replacing the vague message
"missing dot in first path element" you get today with much more friendly
one - "module was found, but does not contain package".

Fixes #35273

Change-Id: I6d726c17e6412258274b10f58f76621617d26e0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/203118
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/modload/import.go
src/cmd/go/testdata/script/mod_replace_import.txt