Skip to content

Commit 94ddb2d

Browse files
author
Bryan C. Mills
committed
cmd/go/internal/modload: revert duplicate path suppression in modload.ImportMissingError
CL 210338 suppressed duplication for import paths mentioned in an ImportMissingError. Unfortunately, that broke one of the cases in cmd/go/internal/modload.TestImport, and the new error message is still kind of awkward anyway. Let's revert that part of the change — we can try again with more coverage for that case. Updates #35986 Change-Id: Ib0858aec4f89a7231e32c35ec876da80d80f2098 Reviewed-on: https://go-review.googlesource.com/c/go/+/210342 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
1 parent 76d2f6c commit 94ddb2d

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/cmd/go/internal/modload/import.go

-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ func (e *ImportMissingError) Error() string {
4242
if search.IsStandardImportPath(e.Path) {
4343
return fmt.Sprintf("package %s is not in GOROOT (%s)", e.Path, filepath.Join(cfg.GOROOT, "src", e.Path))
4444
}
45-
if i := load.ImportPathError(nil); errors.As(e.QueryErr, &i) {
46-
return fmt.Sprintf("cannot find module: %v", e.QueryErr)
47-
}
4845
if e.QueryErr != nil {
4946
return fmt.Sprintf("cannot find module providing package %s: %v", e.Path, e.QueryErr)
5047
}

0 commit comments

Comments
 (0)