Documentation ¶
Index ¶
- type Module
- func GetDependencies(logger *logrus.Logger, moduleDir string) (*Module, map[string]*Module, error)
- func GetDependenciesWithUpdates(logger *logrus.Logger, moduleDir string) (*Module, map[string]*Module, error)
- func GetModule(logger *logrus.Logger, moduleDir string, targetModule string) (*Module, error)
- func GetModuleWithUpdate(logger *logrus.Logger, moduleDir string, targetModule string) (*Module, error)
- type ModuleError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct { Main bool // is this the main module? Indirect bool // is it an indirect dependency? Path string // module path Replace *Module // replaced by this module Version string // module version Time *time.Time // time version was created Update *Module // available update, if any (with -u) GoMod string // the path to this module's go.mod file GoVersion string // the Go version associated with the module Error *ModuleError // error loading module }
Module represents the data returned by 'go list -m --json' for a Go module.
func GetDependencies ¶
Retrieve the Module information for all dependencies of the Go module found at the specified path.
func GetDependenciesWithUpdates ¶
func GetDependenciesWithUpdates(logger *logrus.Logger, moduleDir string) (*Module, map[string]*Module, error)
Retrieve the Module information for all dependencies of the Go module found at the specified path, including any potentially available updates. This requires internet connectivity in order to return the results. Lack of connectivity should result in an error being returned but this is not a hard guarantee.
func GetModule ¶
Retrieve the Module information for the specified target module which must be a dependency of the Go module found at the specified path.
func GetModuleWithUpdate ¶
func GetModuleWithUpdate(logger *logrus.Logger, moduleDir string, targetModule string) (*Module, error)
Retrieve the Module information for the specified target module which must be a dependency of the Go module found at the specified path, including any potentially available updates. This requires internet connectivity in order to return the results. Lack of connectivity should result in an error being returned but this is not a hard guarantee.
type ModuleError ¶
type ModuleError struct {
Err string // the error itself
}
ModuleError represents the data that is returned whenever Go tooling was unable to load a given module's information.