Version
typeVersion is a parsed semantic version. Build metadata is retained for display but, per the spec, is ignored when comparing precedence.
Value
semver.Version
errBadVersion
*errors.errorString- OID
- 041494…5839:4
errBadVersion details
submitted
*v0.Treesubmitted holds versions users have posted on-chain: version string -> submitter.
- OID
- 041494…5839:7
submitted details
Parse
func(s string) (semver.Version, .uverse.error)Parse reads "vMAJOR.MINOR.PATCH\[-prerelease]\[+build]". The leading 'v' is optional. Numeric fields must be non-empty digit runs without leading zeros.
- OID
- 041494…5839:9
Parse details
Compare
func(a string, b string) intCompare returns -1, 0, or +1 as a \< b, a == b, or a > b under semver precedence. Unparseable inputs sort after everything valid (and equal to each other), so Compare never panics.
- OID
- 041494…5839:11
Compare details
comparePre
func(a []string, b []string) intcomparePre implements SemVer §11: a version WITH a pre-release has lower precedence than the same version WITHOUT one.
- OID
- 041494…5839:12
comparePre details
compareIdent
func(a string, b string) intcompareIdent: numeric identifiers compare numerically and always rank below alphanumeric ones; alphanumerics compare in ASCII order.
- OID
- 041494…5839:13
compareIdent details
cmpInt
func(a int, b int) int- OID
- 041494…5839:14
cmpInt details
parseNum
func(s string) (int, bool)parseNum accepts a non-empty run of ASCII digits with no leading zero (except "0" itself), returning the value and whether it qualified.
- OID
- 041494…5839:15
parseNum details
validPreIdent
func(s string) boolvalidPreIdent allows \[0-9A-Za-z-] and rejects empty identifiers.
- OID
- 041494…5839:16
validPreIdent details
ufmt
func(n int) string- OID
- 041494…5839:17
ufmt details
Submit
func(version string)Submit stores a valid version on-chain, tagged with the caller's address, so Render("/sorted") can list everyone's submissions in precedence order.
- OID
- 041494…5839:18
Submit details
Render
func(path string) string- OID
- 041494…5839:19
Render details
renderHome
func() string- OID
- 041494…5839:20
renderHome details
renderCompare
func(a string, b string) string- OID
- 041494…5839:21
renderCompare details
describe
func(label string, s string) string- OID
- 041494…5839:22
describe details
renderSorted
func() string- OID
- 041494…5839:23
renderSorted details
entry
typeentry pairs a parsed version with the address that submitted it.
Value
semver.entry
byPrecedence
typebyPrecedence sorts entries ascending. \`sort\` on-chain has no Slice helper, so we implement sort.Interface.
Value
semver.byPrecedence
relSym
func(c int) string- OID
- 041494…5839:24
relSym details
word
func(c int) string- OID
- 041494…5839:25
word details
ufmtSigned
func(c int) string- OID
- 041494…5839:26