Documentation
¶
Overview ¶
Package version provides a VersionComparison method to make comparing versions easy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApproxGreaterThan ¶
func MatchConstraint ¶
Types ¶
type ConstraintType ¶
type ConstraintType int
const ( NoMatch ConstraintType = iota BeEqualTo BeGreaterThan BeLessThan BeGreaterThanOrEqual BeLessThanOrEqual BeApproxGreaterThan )
Version Constrain Type
func GetConstraintType ¶
func GetConstraintType(verConstraint string) ConstraintType
type VersionComparison ¶
type VersionComparison int
const ( GreaterThan VersionComparison = iota LessThan EqualTo )
Version Comparison
func Compare ¶
func Compare(ver string, compTo string) VersionComparison
VersionCompare takes a version and compares it to another version. It returns GreaterThan, LessThan, or EqualTo
Click to show internal directories.
Click to hide internal directories.