cmd/heapview: look for tools repository in all GOPATH entries
The GOPATH environment variable is defined at
> The GOPATH environment variable lists places to look for Go code. On
> Unix, the value is a colon-separated string. On Windows, the value is
> a semicolon-separated string. On Plan 9, the value is a list.
It is legal for Go packages to be in any of those places, not only
the first entry. Look in all places for golang.org/x/tools repository.
Cache the directory that is found. It's slightly more expensive
to look for it, since potentially multiple directories must be
checked for existence.
Reviewed-by: Michael Matloob <email@example.com>
1 file changed