semantic_tags

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL