Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrGoModNotFound returned when go.mod file cannot be found for an app. ErrGoModNotFound = errors.New("go.mod not found") // ErrModuleNotFound is returned when a Go module is not found. ErrModuleNotFound = errors.New("module not found") )
Functions ¶
func JoinPath ¶
JoinPath joins a Go import path URI to a version. The result path have the "path@version" format.
func LocatePath ¶
func LocatePath(ctx context.Context, cacheStorage cache.Storage, src string, pkg Version) (path string, err error)
LocatePath locates pkg's absolute path managed by 'go mod' on the local filesystem.
Types ¶
type Module ¶
type Module struct { // Path is the Go module path. Path string // Version is the module version. Version string // Dir is the absolute path to the Go module. Dir string }
Module contains Go module info.
func FindModule ¶
FindModule returns the Go module info for an import path. The module is searched within the dependencies of the module defined in root dir. If a local module path is passed, it returns the local module info.
type Version ¶
Version is an alias to the module version type.
func FilterVersions ¶
FilterVersions filters dependencies under require section by their paths.
Click to show internal directories.
Click to hide internal directories.