Documentation
¶
Overview ¶
This file was originally vendored from: https://github.com/coreos/go-semver/tree/e214231b295a8ea9479f11b70b35d5acf3556d9b/semver There isn't a single line left from the original source today, but being generous about attribution won't hurt.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Version ¶
type Version struct {
Major int64
Minor int64
Patch int64
PreRelease string `json:"PreRelease,omitempty"`
Metadata string `json:"Metadata,omitempty"`
}
Version represents a parsed SemVer
func MustParse ¶ added in v1.11.0
MustParse is like Parse but panics if the version string is invalid instead of returning an error.
func (Version) AppendText ¶ added in v1.11.0
AppendText appends the textual representation of the version to b and returns the extended buffer. This method conforms to the encoding.TextAppender interface, and is useful for serializing the Version without allocating, provided the caller has pre-allocated sufficient space in b.
func (Version) Compare ¶
Compare tests if v is less than, equal to, or greater than other, returning -1, 0, or +1 respectively. Comparison is based on the SemVer specification (https://semver.org/#spec-item-11).