Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNewerVersion ¶
IsNewerVersion returns true if newversion is greater than oldversion in terms of semver. If major is true, then newversion must be a major version ahead of oldversion to be considered newer.
func MaxVersion ¶
MaxVersion returns the larger of two versions according to semantic version precedence. Incompatible versions are considered lower than non-incompatible ones. Invalid versions are considered lower than valid ones. If both versions are invalid, the empty string is returned.
func Updates ¶
func Updates(opt UpdateOptions)
Updates finds updates for a set of specified modules.
Types ¶
type Module ¶
Module contains the module path and versions
func Latest ¶
Latest finds the latest major version of a module cached sets the Disable-Module-Fetch: true header
func Query ¶
Query the module proxy for all versions of a module. If the module does not exist, the second return parameter will be false cached sets the Disable-Module-Fetch: true header
func QueryPackage ¶
QueryPackage tries to find the module path for the provided package path it does so by repeatedly chopping off the last path element and trying to use it as a path.
func (*Module) MaxVersion ¶
MaxVersion returns the latest version. If there are no versions, the empty string is returned. Prefix can be used to filter the versions based on a prefix. If pre is false, pre-release versions will are excluded.
func (*Module) NextMajorPath ¶
NextMajorPath returns the module path of the next major version
func (*Module) WithMajorPath ¶
WithMajorPath returns the module path for the provided version