graph

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph struct {
	Root      string
	FromCache bool
	// contains filtered or unexported fields
}

func Load

func Load(ctx context.Context, opts LoadOptions) (*Graph, error)

func UnmarshalGraph

func UnmarshalGraph(payload []byte) (*Graph, error)

func (*Graph) AffectedTestPackages

func (g *Graph) AffectedTestPackages(seeds []string) []string

func (*Graph) BrokenPackages

func (g *Graph) BrokenPackages() []string

func (*Graph) DependencyClosure

func (g *Graph) DependencyClosure(seeds []string) []string

func (*Graph) Len

func (g *Graph) Len() int

func (*Graph) MarshalBinary

func (g *Graph) MarshalBinary() ([]byte, error)

func (*Graph) Modules

func (g *Graph) Modules() []string

func (*Graph) Package

func (g *Graph) Package(importPath string) (*Package, bool)

func (*Graph) PackageForFile

func (g *Graph) PackageForFile(absPath string) (*Package, bool)

func (*Graph) Packages

func (g *Graph) Packages() []string

Packages lists every package in the workspace, testable or not. Risk analysis needs the untestable ones too: a package with no tests of its own may still be covered by its importers, or by nothing.

func (*Graph) ProductionClosure

func (g *Graph) ProductionClosure(seeds []string) map[string]bool

func (*Graph) TestablePackages

func (g *Graph) TestablePackages() []string

type LoadOptions

type LoadOptions struct {
	Root     string
	Tags     []string
	Env      []string
	Cache    *cache.Store
	Manifest *cache.Manifest
}

type Package

type Package struct {
	ImportPath  string
	Dir         string
	Module      string
	Imports     []string
	TestImports []string
	HasTests    bool
	Broken      bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL