1
0
mirror of https://github.com/golang/go synced 2024-09-30 14:28:33 -06:00
go/cmd
Dmitri Shuralyov ef3dcd5937 cmd/heapview: look for tools repository in all GOPATH entries
The GOPATH environment variable is defined at
https://golang.org/cmd/go/#hdr-GOPATH_environment_variable as:

> 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.

Updates golang/go#19400.

Change-Id: I16661b7149d52ea6168fffc605c842d7a4da009b
Reviewed-on: https://go-review.googlesource.com/38778
Reviewed-by: Michael Matloob <matloob@golang.org>
2017-04-10 18:12:01 +00:00
..
benchcmp benchmark/parser, cmd/benchcmp: improve names of exported identifiers 2015-01-15 01:28:17 +00:00
bundle all: apply new machine-generated doc spec to files 2017-04-01 01:24:29 +00:00
callgraph x/tools: simplify and format code 2017-02-28 14:15:42 +00:00
compilebench cmd/compilebench: fix package name in comment 2017-04-10 17:39:46 +00:00
cover cmd/cover: check os.Create error im html output 2017-01-08 00:00:17 +00:00
digraph tools: add import comments. 2014-12-09 22:42:16 +00:00
eg Revert "refactor/eg: remove vendor prefix from imported packages" 2016-11-30 00:13:03 +00:00
fiximports cmd/godoc, cmd/fiximports: fix or skip failing tests at tip 2016-10-12 15:24:30 +00:00
godex cmd/godex: handle printing of type aliases 2017-01-11 21:17:45 +00:00
godoc cmd/godoc: fix tests for cmd/compile refactorings 2017-03-21 23:01:40 +00:00
goimports cmd/goimports: flush to disk before diffing 2017-03-31 04:14:08 +00:00
gomvpkg go/buildutil: TagsFlag provides a flag.Value for setting build.Context.BuildTags from -tags flag. 2015-04-23 14:10:21 +00:00
gorename cmd/gorename: -d flag prints diffs instead of rewriting files 2015-12-30 15:25:00 +00:00
gotype gotype: fix default importer for Go 1.8. 2017-04-10 16:28:46 +00:00
goyacc cmd/goyacc: remove empty branch 2017-03-15 21:33:42 +00:00
guru cmd/guru: Close before Remove a file 2017-03-28 13:38:24 +00:00
heapview cmd/heapview: look for tools repository in all GOPATH entries 2017-04-10 18:12:01 +00:00
html2article x/tools/cmd/html2article: remove unused functions 2017-03-01 14:53:04 +00:00
present x/tools: simplify and format code 2017-02-28 14:15:42 +00:00
ssadump tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
stress all: fix plan9 failures 2016-01-28 00:31:03 +00:00
stringer cmd/stringer: tweak "Code generated by" comment to match new standard 2017-03-21 04:07:08 +00:00
tip cmd/tip: redirect http://tip.golang.org to https 2017-04-03 05:32:14 +00:00
toolstash cmd/toolstash: don't build cmd for android 2017-04-05 15:47:30 +00:00