Documentation
¶
Overview ¶
Package discover lists the package closure used by one rask run.
Discovery sits on top of gotool.Tool. It resolves the user's patterns into selected packages, loads the local package closure needed for fingerprinting, and rejects load errors before hashing starts.
Packages returns a finished slice instead of streaming on a channel because `go list` already materializes discovery as a batch. The old stream only replayed a completed slice, which made cancellation and ownership harder to reason about without reducing memory use.
Index ¶
- func GoWorkPath(environment []byte) string
- func LocalModuleRoots(ctx context.Context, tool gotool.Tool, module gotool.Module) ([]string, error)
- func LocalModuleRootsFromEnvironment(ctx context.Context, tool gotool.Tool, module gotool.Module, ...) ([]string, error)
- func LocalReplaceRoots(root string) ([]string, error)
- func Packages(ctx context.Context, tool gotool.Tool, module gotool.Module, patternDir string, ...) ([]gotool.Package, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoWorkPath ¶
GoWorkPath centralizes GOWORK semantics so root discovery stays deterministic.
func LocalModuleRoots ¶
func LocalModuleRoots( ctx context.Context, tool gotool.Tool, module gotool.Module, ) ([]string, error)
LocalModuleRoots uses go env once so workspace state matches this run.
func LocalModuleRootsFromEnvironment ¶
func LocalModuleRootsFromEnvironment( ctx context.Context, tool gotool.Tool, module gotool.Module, environment []byte, ) ([]string, error)
LocalModuleRootsFromEnvironment avoids a second go env for cache salting.
func LocalReplaceRoots ¶
LocalReplaceRoots avoids x/mod so discovery keeps its zero-dependency contract.
Types ¶
This section is empty.