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
internal/stdlib: provide API for import graph of std library
This CL adds two functions for accessing the direct and
transitive imports of the packages of the standard library:
func Imports(pkgs ...string) iter.Seq[string]
func Dependencies(pkgs ...string) iter.Seq[string]
These are needed by modernizers so that they can avoid offering
fixes that add an import of, say, "slices" while analyzing a
package that is itself a dependency of "slices".
The compressed graph is generated from the current toolchain;
this may not exactly match the source code being analyzed by
the application, but we expect drift to be small.
Updates golang/go#70815
Change-Id: I2d7180bcff1d1c72ce61b8436a346b8921c02ba9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/653356
Commit-Queue: Alan Donovan <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Alan Donovan <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
0 commit comments