Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetModFile ¶
GetLatestVersion returns the go.mod file of a module.
func ListVersions ¶
ListVersions lists all versions of a module. Sorts the versions in descending order by semver.
func SetDefaultClient ¶
func SetGoProxy ¶ added in v0.1.5
func SetGoProxy(proxy string)
Types ¶
type Module ¶ added in v0.1.8
type Module struct {
Path string // module path
Query string // version query corresponding to this version
Version string // module version
Versions []string // available module versions
Replace *Module // replaced by this module
Time *time.Time // time version was created
Update *Module // available update (with -u)
Main bool // is this the main module?
Indirect bool // module is only indirectly needed by main module
Dir string // directory holding local copy of files, if any
GoMod string // path to go.mod file describing module, if any
GoVersion string // go version used in module
Retracted []string // retraction information, if any (with -retracted or -u)
Deprecated string // deprecation message, if any (with -u)
Error *ModuleError // error loading module
Sum string // checksum for path, version (as in go.sum)
GoModSum string // checksum for go.mod (as in go.sum)
Origin any // provenance of module
Reuse bool // reuse of old module info is safe
}
func ListAllModules ¶ added in v0.1.8
type ModuleError ¶ added in v0.1.8
type ModuleError struct {
Err string // the error itself
}
Click to show internal directories.
Click to hide internal directories.