You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find needs to invoke the go command to find the package export data.
It cannot rely on GOPATH-based file location heuristics.
This has the nice side effect of automatically compiling the code,
removing the possibility of stale export data.
Ideally Find would use go/packages, but go/packages imports
this package for the export data parser (not for Find itself),
so we have to make do with an explicit go command invocation.
Marked both Find and NewImporter deprecated: using go/packages
will be faster for nearly all use cases, because it can gather info
about multiple packages in a single go command invocation.
They are essentially unused anyway.
Removed the file name print from the example because
the file may be in the cache, in which case it will not be
named "fmt.a".
Change-Id: I7940c90e230b22df9dcbfc8103a69a2d18df3bb0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/310515
Reviewed-by: Alan Donovan <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
gopls-CI: kokoro <[email protected]>
Run-TryBot: Russ Cox <[email protected]>
Auto-Submit: Russ Cox <[email protected]>
0 commit comments