Documentation
¶
Index ¶
- Constants
- func CompareVersions(v1 string, v2 string) (int, error)
- func IsVersionExpression(expr string) bool
- func IsVersionString(expr string) bool
- type Version_Expression
- func (self *Version_Expression) ChangeCeiling(ceiling_version string, inclusive bool) error
- func (self *Version_Expression) Get_end_version() string
- func (self *Version_Expression) Get_expression() string
- func (self *Version_Expression) Get_start_version() string
- func (self *Version_Expression) IntersectsWith(other *Version_Expression) error
- func (self *Version_Expression) Is_within_range(expr string) (bool, error)
- func (ve Version_Expression) String() string
Constants ¶
const INF = "INFINITY"
Variables ¶
This section is empty.
Functions ¶
func CompareVersions ¶
Return 1 if the input version v1 is higher than v2
0 if the input version v1 equals to v2 -1 if the input version v1 is lower than v2 error if v1 or v2 is no a valid sigle version string
func IsVersionExpression ¶
Return true if the input version string is a full version expression
func IsVersionString ¶
Return true if the input version string is a valid version according to the version string schema above. A number with leading 0's, for example 1.02.1, is not a valid version string.
Types ¶
type Version_Expression ¶
type Version_Expression struct {
// contains filtered or unexported fields
}
func Version_Expression_Factory ¶
func Version_Expression_Factory(ver_string string) (*Version_Expression, error)
func (*Version_Expression) ChangeCeiling ¶
func (self *Version_Expression) ChangeCeiling(ceiling_version string, inclusive bool) error
change the ceiling of this version range.
func (*Version_Expression) Get_end_version ¶
func (self *Version_Expression) Get_end_version() string
Return the end version
func (*Version_Expression) Get_expression ¶
func (self *Version_Expression) Get_expression() string
Return the version expression that was used as input to create this object
func (*Version_Expression) Get_start_version ¶
func (self *Version_Expression) Get_start_version() string
Return the start version
func (*Version_Expression) IntersectsWith ¶
func (self *Version_Expression) IntersectsWith(other *Version_Expression) error
make this version equals to the intersection of self and the given version
func (*Version_Expression) Is_within_range ¶
func (self *Version_Expression) Is_within_range(expr string) (bool, error)
Return true if the input version string in a valid version string and if it falls within the boundaries of this object's version range.
func (Version_Expression) String ¶
func (ve Version_Expression) String() string