]> Cypherpunks repositories - gostls13.git/commitdiff
internal/goroot: report PkgfileMap error on invalid line
authorTobias Klauser <tklauser@distanz.ch>
Tue, 15 Nov 2022 11:26:11 +0000 (12:26 +0100)
committerGopher Robot <gobot@golang.org>
Wed, 16 Nov 2022 14:38:38 +0000 (14:38 +0000)
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>

src/internal/goroot/importcfg.go

index 51d0d77604fe9f1017ca89bcbd655ae1564de59c..89f58c5d3eb8670abb8c7c3d7fe3f07491fc138b 100644 (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]