]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/cfg: improve error message when GOPATH is unset
authorsiddharth <s@ricketyspace.net>
Mon, 28 Jun 2021 23:36:53 +0000 (19:36 -0400)
committerBryan C. Mills <bcmills@google.com>
Mon, 4 Oct 2021 18:58:42 +0000 (18:58 +0000)
commit7d822af4500831d131562f17dcf53374469d823e
tree94d6b7b584309f52dfe054b9213f22c5dc4c8339
parent9f8d558c3b28def1b188e60e1b3b8361a461c9e2
cmd/go/internal/cfg: improve error message when GOPATH is unset

Add GoPathError variable. This variable gets set when GOPATH is not
set in the environment and in build.Default.GOPATH. GoPathError may
be used in "GOPATH unset" error messages to explain why GOPATH is not
set.

This CL improves upon CL 158257.

Fixes #29341

Change-Id: Ib42b42fb442c8297d58da4ca556be55e21a034e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/331529
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
src/cmd/go/internal/cfg/cfg.go
src/cmd/go/internal/modfetch/sumdb.go