Documentation
¶
Overview ¶
Package semver compares release versions well enough for lich's update checks: MAJOR.MINOR.PATCH plus the SemVer rule that a pre-release precedes the release it qualifies. It does not order two distinct pre-releases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRelease ¶
IsRelease reports whether v is a plain MAJOR.MINOR.PATCH release version — no pre-release or build-metadata suffix. A dev build ("dev", or the "-N-gSHA" that git describe emits between tags) is not a release, so the update check must not treat it as one.
func Less ¶
Less reports whether version a is strictly older than b. Missing or non-numeric components sort as 0, and a pre-release sorts before the release it qualifies (SemVer §11: 1.0.0-rc1 < 1.0.0).
Two different pre-releases of the same version compare equal (rc.1 vs rc.2 is not ordered): that would need identifier-wise comparison, and the update check only ever weighs a build against GitHub's "latest" release, which never resolves to a pre-release.
Types ¶
This section is empty.