Documentation
¶
Index ¶
- type SemanticTagVersion
- func (v *SemanticTagVersion) Compare(other *SemanticTagVersion) int
- func (v *SemanticTagVersion) Equal(other *SemanticTagVersion) bool
- func (v *SemanticTagVersion) GetLowerVariants() []string
- func (v *SemanticTagVersion) Greater(other *SemanticTagVersion) bool
- func (v *SemanticTagVersion) Less(other *SemanticTagVersion) bool
- func (v *SemanticTagVersion) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SemanticTagVersion ¶
type SemanticTagVersion struct {
Prefix string
Major string
Minor string
Patch string
Build string
Suffix string
}
SemanticTagVersion represents a parsed semantic version tag with optional prefix, suffix, and build metadata.
func NewSemanticVersion ¶
func NewSemanticVersion(tag string) (*SemanticTagVersion, error)
func (*SemanticTagVersion) Compare ¶
func (v *SemanticTagVersion) Compare(other *SemanticTagVersion) int
Compare compares this version with another version Returns: -1 if this version is less than the other
0 if this version is equal to the other 1 if this version is greater than the other
func (*SemanticTagVersion) Equal ¶
func (v *SemanticTagVersion) Equal(other *SemanticTagVersion) bool
Equal returns true if this version is equal to the other version
func (*SemanticTagVersion) GetLowerVariants ¶
func (v *SemanticTagVersion) GetLowerVariants() []string
GetLowerVariants returns all the "lower" variants of this semantic version For example, version "1.2.3" returns ["1.2", "1"] Version "1.2.3.4" returns ["1.2.3", "1.2", "1"]
func (*SemanticTagVersion) Greater ¶
func (v *SemanticTagVersion) Greater(other *SemanticTagVersion) bool
Greater returns true if this version is greater than the other version
func (*SemanticTagVersion) Less ¶
func (v *SemanticTagVersion) Less(other *SemanticTagVersion) bool
Less returns true if this version is less than the other version
func (*SemanticTagVersion) String ¶
func (v *SemanticTagVersion) String() string
String returns the string representation of the semantic version