Documentation ¶
Index ¶
Constants ¶
const ( EnvDefaultMono = "GDENV_DEFAULT_MONO" Prefix = "v" SeparatorBuildMetadata = "+" // https://semver.org/#spec-item-10 SeparatorPreReleaseVersion = "-" // https://semver.org/#spec-item-9 LabelMono = LabelStable + "_" + Mono LabelStable = "stable" Mono = "mono" )
Variables ¶
Functions ¶
func LabelDefault ¶
func LabelDefault() string
Returns the default version label. Set 'GDENV_DEFAULT_MONO' to a boolean value to switch between 'stable' and 'stable_mono' default version labels.
Types ¶
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
A struct containing a Godot version specification.
func MustParse ¶
Parses a 'Version' struct from a semantic version string or panics if it would fail.
func (Version) CompareNormal ¶
Compares the "normal version" (see https://semver.org/#spec-item-2) to another 'Version' struct. The result will be '0' if 'v' == 'w', '-1' if 'v' < 'w', or '+1' if 'v' > 'w'.
func (Version) IsMono ¶
Returns whether the version specifies a "mono" release (i.e. 'stable_mono').
func (Version) IsStable ¶
Returns whether the version specifies a "stable" release (e.g. 'stable' or 'stable_mono').
func (Version) Major ¶
Returns the major version component (see https://semver.org/#spec-item-4).
func (Version) Minor ¶
Returns the minor version component (see https://semver.org/#spec-item-7).
func (Version) Normal ¶
Returns the "normal version" format of the 'Version' (see https://semver.org/#spec-item-2).
func (Version) Patch ¶
Returns the patch version component (see https://semver.org/#spec-item-6).