Documentation
¶
Overview ¶
Package semver reads a version of a module, X.Y.Z, and orders two of them by Semantic Versioning 2.0.0, as the format writes a version: three decimal numerals with no leading zero, and no pre-release and no build metadata (format/README.md, sections 26 and 27; R46 spec). Package moduleindex orders the versions of a module by it, for the rule module-index.version-above and the version of a new attempt, and package module the format versions, MAJOR.MINOR, as the versions MAJOR.MINOR.0; the comparison of versions of a module takes it with T35 (R35).
A numeral has no bound, as a version has none, so a Version keeps its numerals as text and orders them by their length first: no version is too large to read or to order.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
A Version is a version of a module, X.Y.Z: its major, minor and patch numbers, each a decimal numeral with no leading zero. Its zero value is no version.
func Parse ¶
Parse reads a version of a module, X.Y.Z, in the form of common.schema.json#/$defs/module_version: three decimal numerals with no leading zero, joined by ".", and nothing else.