Documentation ¶
Index ¶
- Variables
- func Increment(in string, rt ReleaseType, ident string) (string, error)
- func List(in []string) ([]string, error)
- func Major(in string) (uint64, error)
- func Minor(in string) (uint64, error)
- func Patch(in string) (uint64, error)
- func Prerelease(in string) ([]string, error)
- func SortedList(in []string) ([]string, error)
- func Valid(in string) (string, error)
- type ReleaseType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInternalOnlyReleaseType is returned when a requested release type is for internal use only ErrInternalOnlyReleaseType = errors.New("release type is for internal use only") // ErrUnknownReleaseType is returned when a requested release type is unknown ErrUnknownReleaseType = errors.New("unknown release type") )
Functions ¶
func Increment ¶
func Increment(in string, rt ReleaseType, ident string) (string, error)
Increment returns the version incremented by the release type. This function largely mimics the increment logic found in https://github.com/npm/node-semver
func Prerelease ¶
Prerelease returns an array of prerelease components or nil if none exist
func SortedList ¶
SortedList takes a collection of raw version values and returns a sorted list of valid versions
Types ¶
type ReleaseType ¶
type ReleaseType int
func ToReleaseType ¶
func ToReleaseType(rt string) (ReleaseType, error)
ToReleaseType is a convenience function for getting a valid ReleaseType
func (ReleaseType) String ¶
func (t ReleaseType) String() string
String is the string representation of a ReleaseType
Click to show internal directories.
Click to hide internal directories.