[release-branch.go1.12] cmd/go/internal/modfetch: handle codeRoot == path for paths with major-version suffixes
Fixes #30665
Change-Id: Icbcfdb3907bc003ac17a8c7df17ecb41daf82eb4
Reviewed-on: https://go-review.googlesource.com/c/go/+/166117
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
(cherry picked from commit
1ab9f6837d6da80dad41657a913e47fa13a4fee8)
Reviewed-on: https://go-review.googlesource.com/c/go/+/166317