From: Tobias Klauser Date: Tue, 15 Nov 2022 11:26:11 +0000 (+0100) Subject: internal/goroot: report PkgfileMap error on invalid line X-Git-Tag: go1.20rc1~227 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7c8c209b45ebe5c3d7979c44e53216f61e8b5f2a;p=gostls13.git 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 TryBot-Result: Gopher Robot Reviewed-by: Joedian Reid Reviewed-by: Ian Lance Taylor Run-TryBot: Bryan Mills --- diff --git a/src/internal/goroot/importcfg.go b/src/internal/goroot/importcfg.go index 51d0d77604..89f58c5d3e 100644 --- a/src/internal/goroot/importcfg.go +++ b/src/internal/goroot/importcfg.go @@ -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]