tools/go
Michael Matloob 9dbe528bbb go/packages: add support for 'contains:' words
If a 'word' provided to go/packages' Load function starts with contains,
go/packages will interpret that word as the package containing the given
file.

For example:
   packages.Load(config, "contains:/usr/local/go/src/fmt/format.go")
would load the fmt package from the Go installation at /usr/local/go.

This implementation uses "go list ." in the directory the file is
contained in to find the package, but this won't work in the module
cache. We plan to add support to go list directly to help find the
containing package. Then, because we won't need to change directory,
go list will have knowledge of the correct vgo root module, and will
be able to surface correct results.

Change-Id: I6bff62447c12f13dae5e4c0c65f729d9f271c388
Reviewed-on: https://go-review.googlesource.com/126177
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2018-07-27 19:42:20 +00:00
..
ast/astutil imports: fix lost line between package and import statement 2018-07-10 02:38:27 +00:00
buildutil go/...: make most tests pass with gccgo 2018-06-08 16:58:49 +00:00
callgraph go/callgraph/cha: fix bug computing correspondence of abstract/concrete methods 2018-02-21 01:23:17 +00:00
gccgoexportdata go/gccgoexportdata: correctly handle archive files containing string tables 2016-11-09 21:28:38 +00:00
gcexportdata go/gcexportdata: add -package flag to diagnostic tool 2018-06-27 17:17:06 +00:00
internal go/internal/gcimporter,gccgoimporter: use types.NewInterfaceType 2018-06-26 17:42:40 +00:00
loader go/...: make most tests pass with gccgo 2018-06-08 16:58:49 +00:00
packages go/packages: add support for 'contains:' words 2018-07-27 19:42:20 +00:00
pointer go/...: fix/disable broken tests 2018-01-17 18:00:52 +00:00
ssa go/ssa: fix some incorrect comments 2018-06-20 14:00:53 +00:00
types/typeutil tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
vcs go/vcs: match go-import package prefixes by slash 2018-06-20 03:09:55 +00:00