Documentation
¶
Overview ¶
Package semvery parses version strings that are conventionally SemVer but allow an omitted v prefix, omitted numeric components, or leading zeroes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Version ¶
type Version struct {
// Canonical is the strict, normalized SemVer representation used for
// comparison, such as "v1.2.0" for the source spelling "01.2".
Canonical string
// HasVPrefix reports whether the source spelling started with "v".
HasVPrefix bool
// RawParts contains the numeric components exactly as written, before
// removing leading zeroes or appending omitted components.
RawParts []string
// Prerelease includes the leading "-", or is empty when none was given.
Prerelease string
// Build includes the leading "+", or is empty when none was given.
Build string
}
Version is a parsed SemVer-like version. It contains both the strict SemVer representation used for precedence and details about the source spelling used to choose between equivalent tags.
Click to show internal directories.
Click to hide internal directories.