Documentation
¶
Index ¶
- Variables
- func GetMetaDataPart(versionLiteral string) string
- func GetPreReleasePart(versionLiteral string) string
- func GetVersionPart(versionLiteral string) string
- func IsPartialVersion(versionLiteral string) bool
- func IsStaticVersion(versionLiteral string) bool
- func IsWildCardVersion(versionLiteral string) bool
- type Semver
- func (v1 Semver) Compare(v2 Semver, ignorePreRelease bool) int
- func (v1 Semver) EQ(v2 Semver, ignorePreRelease bool) bool
- func (v1 Semver) GE(v2 Semver, ignorePreRelease bool) bool
- func (v1 Semver) GT(v2 Semver, ignorePreRelease bool) bool
- func (v1 Semver) LE(v2 Semver, ignorePreRelease bool) bool
- func (v1 Semver) LT(v2 Semver, ignorePreRelease bool) bool
- func (v1 Semver) NEQ(v2 Semver, includePreReleases bool) bool
- func (v Semver) String() string
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetMetaDataPart ¶
func GetPreReleasePart ¶
func GetVersionPart ¶
func IsPartialVersion ¶
func IsStaticVersion ¶
func IsWildCardVersion ¶
Types ¶
type Semver ¶
type Semver struct {
Major int
Minor int
Patch int
PreReleaseTag string
MetaData string
// Composer-specific fields
IsDev bool // true for dev versions (dev-master, 1.0.x-dev)
DevBranch string // branch name for dev-* versions
Stability string // stability flag (@stable, @RC, @beta, @alpha, @dev)
}
func ParseSemver ¶
Parses a semver string into a semver object DEPRECATED: Use ParseSemverWithEcosystem for new code. Defaults to NodeJS boilerplates.
func ParseSemverWithEcosystem ¶
ParseSemverWithEcosystem parses a semver string into a semver object for specified ecosystem
func (Semver) Compare ¶
Compares versions v1 and v2, and returns 0 if v1 = v2, returns 1 if v1 > v2 and 0 otherwise This comparision is done according to the semver 2.0 spec
func (Semver) EQ ¶
Compares versions v1 and v2, and returns true if v1 = v2 and false otherwise This comparision is done according to the semver 2.0 spec
func (Semver) GE ¶
Compares versions v1 and v2, and returns true if v1 >= v2 and false otherwise This comparision is done according to the semver 2.0 spec with Composer extensions
func (Semver) GT ¶
Compares versions v1 and v2, and returns true if v1 > v2 and false otherwise This comparision is done according to the semver 2.0 spec
func (Semver) LE ¶
Compares versions v1 and v2, and returns true if v1 <= v2 and false otherwise This comparision is done according to the semver 2.0 spec
func (Semver) LT ¶
Compares versions v1 and v2, and returns true if v1 < v2 and false otherwise This comparision is done according to the semver 2.0 spec