Documentation
¶
Index ¶
- type SemanticVersion
- func (s SemanticVersion) BuildMetadata() string
- func (s SemanticVersion) Compare(other SemanticVersion) int
- func (s SemanticVersion) Equal(other SemanticVersion) bool
- func (s SemanticVersion) Major() int
- func (s SemanticVersion) Minor() int
- func (s SemanticVersion) Patch() int
- func (s SemanticVersion) Prerelease() string
- func (s SemanticVersion) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SemanticVersion ¶
type SemanticVersion struct {
// contains filtered or unexported fields
}
func Parse ¶
func Parse(version string) (*SemanticVersion, error)
Parse creates a new SemanticVersion from a version string
func ParseQuietly ¶
func ParseQuietly(version string) *SemanticVersion
ParseQuietly attempts to parse a version string, returning nil if parsing fails
func (SemanticVersion) BuildMetadata ¶
func (s SemanticVersion) BuildMetadata() string
func (SemanticVersion) Compare ¶
func (s SemanticVersion) Compare(other SemanticVersion) int
Compare implements comparison between two semantic versions Returns -1 if s < other, 0 if s == other, and 1 if s > other
func (SemanticVersion) Equal ¶
func (s SemanticVersion) Equal(other SemanticVersion) bool
Equal compares two semantic versions for equality
func (SemanticVersion) Major ¶
func (s SemanticVersion) Major() int
Getters - using value receivers since they don't modify state
func (SemanticVersion) Minor ¶
func (s SemanticVersion) Minor() int
func (SemanticVersion) Patch ¶
func (s SemanticVersion) Patch() int
func (SemanticVersion) Prerelease ¶
func (s SemanticVersion) Prerelease() string
func (SemanticVersion) String ¶
func (s SemanticVersion) String() string
Click to show internal directories.
Click to hide internal directories.