internal/goroot: report PkgfileMap error on invalid line

Ref. https://go-review.googlesource.com/c/go/+/442303/comment/7caca6eb_0ebe4d51/

Change-Id: Id351b9c25380f0959453bb84ed123d0e784e4866
Reviewed-on: https://go-review.googlesource.com/c/go/+/450595
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
This commit is contained in:
Tobias Klauser 2022-11-15 12:26:11 +01:00 committed by Gopher Robot
parent 80c5bbc627
commit 7c8c209b45
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ func PkgfileMap() (map[string]string, error) {
}
sp := strings.SplitN(line, " ", 2)
if len(sp) != 2 {
err = fmt.Errorf("determining pkgfile map: invalid line in go list output: %q", line)
stdlibPkgfileErr = fmt.Errorf("determining pkgfile map: invalid line in go list output: %q", line)
return
}
importPath, export := sp[0], sp[1]