Documentation
¶
Index ¶
Constants ¶
View Source
const ( VersionMajor uint16 = 0 VersionMinor uint16 = 1 VersionPatch uint16 = 2 VersionAB uint16 = 0xFFFF Version uint64 = (uint64(VersionMajor) << 48) + (uint64(VersionMinor) << 32) + (uint64(VersionPatch) << 16) + (uint64(VersionAB) << 0) )
Variables ¶
This section is empty.
Functions ¶
func CalcVersionString ¶
Calculates a version string, which is conventionally a dotted string of the form "<MAJOR>.<MINOR>.<PATCH>", where each of <MAJOR>, <MINOR>, <PATCH> is a number, e.g. "1.2.3". This is the form presented when either of the following two conditions is true:
1. All of `verMajor`, `verMinor`, `verPatch` have the value 0; or 2. `VersionAB` has the value 0xffff.
In all other cases, the version string takes the form of "<MAJOR>.<MINOR>.<PATCH>.<AB_DGNTR>", where <AB_DGNTR> - called the αβ-designator - has a variety of forms as described by the following rules (listed in order of precedence):
- If both `verMajor` and `verMinor` have the value 0, then the αβ-designator is a simple number, as in "0.0.13.5432";
- If `verAB` is >= 0xC000, then αβ-designator designates a "release candidate" where the RC number is verAB-0xC000, e.g. "0.1.2-rc1" (for a `verAB` of 0xC002);
- If `verAB` is >= 0x8000, then αβ-designator designates a "beta" where the RC number is verAB-0x800), e.g. "0.1.2-beta13" (for a `verAB` of 0x800D);
- If `verAB` is >= 0x4000, then αβ-designator designates an "alpha" where the RC number is verAB-0x800), e.g. "0.1.2-alpha7" (for a `verAB` of 0x8007);
- If `verAB` is > 0, then αβ-designator designates something sub-alpha, perhaps an experimental release, and is given a plain number form, e.g. "0.1.2.4660" (for a `verAB` of 0x1234).
func VersionString ¶
func VersionString() string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.