Commit ab790554 authored by Bryan C. Mills's avatar Bryan C. Mills
Browse files

cmd/go/internal/modload: fix up main-module checks from CL 334932

Some critical Version == "" checks were missing in mvs.go, causing
mvs.Req to fail to retain requirements provided by older versions of
main modules.

A few checks also ought to be rotated to put the less expensive
string-equality checks before the more expensive map lookups.

Fixes #48511

Change-Id: Ib8de9d49a6413660792c003866bfcf9ab7f82ee2
Reviewed-on: https://go-review.googlesource.com/c/go/+/368136


Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 0e1d553b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment