go/go
Michael Matloob d190e260e5 go/packages: add a workaround for different import stacks between go versions
Go 1.15+, as of CL 224660, puts the importing package on the top of the stack
(because it makes more sense in the errors). Look there by default and fall
back to second from top position if top of stack is the package itself.

Updates golang/go#36173

Change-Id: I1681089b4a18af9e535661668329ad32b1ba1936
Reviewed-on: https://go-review.googlesource.com/c/tools/+/225677
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-03-27 19:06:04 +00:00
..
analysis
ast
buildutil
callgraph
cfg
expect
gccgoexportdata
gcexportdata
internal
loader
packages
pointer
ssa
types
vcs