Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constraints ¶
type Version ¶
type Version interface { // Compare compares this version to another version. This // returns -1, 0, or 1 if this version is smaller, equal, // or larger than the other version, respectively. Compare(other Version) int // Equal tests if two versions are equal. Equal(other Version) bool // Metadata returns any metadata that was part of the version string. // // Metadata is anything that comes after the "+" in the version. // For example, with "1.2.3+beta", the metadata is "beta". Metadata() string // Prerelease returns any prerelease data that is part of the version, // or blank if there is no prerelease data. // // Prerelease information is anything that comes after the "-" in the // version (but before any metadata). For example, with "1.2.3-beta", // the prerelease information is "beta". Prerelease() string // Segments returns the numeric segments of the version as a slice of ints. Segments() []int // String returns the full version string included pre-release and metadata information. String() string // Original returns the original parsed version as-is Original() string }
Click to show internal directories.
Click to hide internal directories.