diff options
author | Bryan C. Mills <bcmills@google.com> | 2019-07-08 18:13:23 -0400 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2020-02-28 19:09:53 +0000 |
commit | 5a61de3fe160cc8b327ee893cd74c4d0ce9dc13d (patch) | |
tree | 3dbf0328ac9de682fd44c47cd28b600a2cacbc84 /src/cmd/go/internal/modload/import.go | |
parent | d11e1f92fc578c5d2e604acfe9ea60d7afb84a0c (diff) | |
download | go-5a61de3fe160cc8b327ee893cd74c4d0ce9dc13d.tar.gz go-5a61de3fe160cc8b327ee893cd74c4d0ce9dc13d.zip |
cmd/go: rationalize errors in internal/load and internal/modload
This change is a non-minimal fix for #32917, but incidentally fixes
several other bugs and makes the error messages much more ergonomic.
Updates #32917
Updates #27122
Updates #28459
Updates #29280
Updates #30590
Updates #37214
Updates #36173
Updates #36587
Fixes #36008
Fixes #30992
Change-Id: Iedb26d2e0963697c130df5d0f72e7f83ec2dcf06
Reviewed-on: https://go-review.googlesource.com/c/go/+/185345
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/modload/import.go')
-rw-r--r-- | src/cmd/go/internal/modload/import.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/cmd/go/internal/modload/import.go b/src/cmd/go/internal/modload/import.go index 3db3a266d5..162c29d2a6 100644 --- a/src/cmd/go/internal/modload/import.go +++ b/src/cmd/go/internal/modload/import.go @@ -132,8 +132,6 @@ func Import(path string) (m module.Version, dir string, err error) { } dir := filepath.Join(cfg.GOROOT, "src", path) return module.Version{}, dir, nil - } else if pathIsStd && path == cfg.GOROOTsrc { - return module.Version{}, dir, errors.New("directory should not directly contain source files") } // -mod=vendor is special. |