Documentation
¶
Overview ¶
Package dep provides utilities to find dependencies in the manifest files of many different package managers.
Index ¶
Constants ¶
View Source
const ( ManagerTypeDotnet = "dotnet" ManagerTypeElixir = "elixir" ManagerTypeGo = "go" ManagerTypeJava = "java" ManagerTypeJavaScript = "js" ManagerTypePHP = "php" ManagerTypePython = "python" ManagerTypeRuby = "ruby" ManagerTypeRust = "rust" )
Variables ¶
View Source
var AllManagerTypes = []string{ ManagerTypeDotnet, ManagerTypeElixir, ManagerTypeGo, ManagerTypeJava, ManagerTypeJavaScript, ManagerTypePHP, ManagerTypePython, ManagerTypeRuby, ManagerTypeRust, }
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct { Vendor string // The vendor, if any. Name string // The standard package name, which may include the vendor name. Constraint string // The version constraint. Version string // The resolved version (e.g. from a lock file). IsDirect bool // True if explicitly specified in manifest, false if transitive/from lock file only. IsDevOnly bool // True if this is a development-only dependency. ToolName string // The external name of the tool that manages this dependency (e.g. "uv", "poetry", "composer"). }
type Manager ¶
type Manager interface { // Init collects data for the manager: parsing files, etc. // Implementations may be run multiple times: they should ensure they only read files once. Init() error // Get finds a specific dependency by name. Get(name string) (Dependency, bool) // Find looks for dependencies using a wildcard pattern. Find(pattern string) []Dependency }
func GetCachedManager ¶
GetCachedManager returns a cached and initialized dep.Manager for the given filesystem directory.
Click to show internal directories.
Click to hide internal directories.