Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/imports: fix two "nil pointer in interface" bugs
CL 559635 changed newModuleResolver so that it can return (nil, err). That means it is no longer safe to unconditionally convert the first result to a Resolver interface, but we forgot to check in two places, causing a crash that was reported by telemetry. This change adds the two checks. Fixes golang/go#66490 Change-Id: I3f2b84ed792b1eea179fc0d4d5ee9843281506fc Reviewed-on: https://go-review.googlesource.com/c/tools/+/574136 Reviewed-by: Peter Weinberger <pjw@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
- Loading branch information