Documentation
¶
Index ¶
Constants ¶
View Source
const VERSION_PLACEHOLDER = "{{VERSION}}"
View Source
const VERSION_REGEX = `(?P<full>` +
`(?P<major>0|[1-9]\d*)` +
`(?:\.(?P<minor>0|[1-9]\d*))?` +
`(?:\.(?P<patch>0|[1-9]\d*))?` +
`(?:\.(?P<patch2>0|[1-9]\d*))?` +
`(?:[.-](?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?` +
`(?:\+(?P<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?` +
`)`
VERSION_REGEX inspired from https://semver.org/
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Version ¶
type Version struct {
Text string
Major *uint
Minor *uint
Patch *uint
Patch2 *uint
Prerelease string
Build string
}
func FromString ¶
func (Version) FillVersionsPlaceholders ¶
func (Version) IsNewerThan ¶
Click to show internal directories.
Click to hide internal directories.