Graph represents a directed acyclic dependency graph of Go modules. // module -> intra-graph reverse dependencies // module -> intra-graph dependencieslayers[][]*Modulemodulesmap[string]*Module DependentsOf returns the sorted intra-graph modules that depend on modPath. DepsOf returns the sorted intra-graph dependencies of modPath. Layers returns the modules partitioned into topological layers. Module looks up a module by its Go module path. Modules returns all modules in topological order. Subgraph returns a new layered Graph containing only modules whose Path is
present in selected. TransitiveDependents returns the set of all module paths in g that are either
in seeds or depend (directly or transitively) on a module in seeds.
func Build(modules []*Module) (*Graph, error)
func (*Graph).Subgraph(selected map[string]bool) (*Graph, error)
func go.pact.im/x/goship/internal/release.filterChanged(snap *release.Snapshot, graph *Graph, withDependents bool, skipped []release.SkippedInfo) (*Graph, []release.SkippedInfo, error)
func go.pact.im/x/goship/internal/release.buildLayerPlan(index int, layer []*Module, snap *release.Snapshot, graph *Graph, resolvedVer, resolvedTag map[string]string, modWarnings map[string][]string, commitTmpl, tagTmpl *template.Template) (release.LayerPlan, error)
func go.pact.im/x/goship/internal/release.filterChanged(snap *release.Snapshot, graph *Graph, withDependents bool, skipped []release.SkippedInfo) (*Graph, []release.SkippedInfo, error)
Package-Level Functions (total 11, in which 2 are exported)
Build constructs a Graph from modules, detects dependency cycles, and
partitions the modules into topological layers using Kahn’s algorithm.
Layer 0 contains modules with no intra-graph dependencies. Each subsequent
layer k contains modules whose intra-graph dependencies all appear in layers
strictly less than k.
Filter partitions modules into kept and skipped according to opts.