Documentation ¶
Index ¶
Constants ¶
View Source
const ( AppMajor uint = 0 AppMinor uint = 2 AppPatch uint = 2 // AppPreRelease MUST only contain characters from semanticAlphabet per // the semantic versioning spec. AppPreRelease = "beta" )
Variables ¶
View Source
var ( // URL is the git URL for the repository URL = "github.com/p9c/duod" // GitRef is the gitref, as in refs/heads/branchname GitRef = "refs/heads/master" // GitCommit is the commit hash of the current HEAD GitCommit = "3c0d1a4fa0fc34c0dbd93cd4584c8d237e6e168e" // BuildTime stores the time when the current binary was built BuildTime = "2021-04-02T00:45:11+02:00" // Tag lists the Tag on the build, adding a + to the newest Tag if the commit is // not that commit Tag = "+" // PathBase is the path base returned from runtime caller PathBase = "/home/loki/src/github.com/p9c/duod/" )
View Source
var AppBuild string
appBuild is defined as a variable so it can be overridden during the build process with '-ldflags "-X main.appBuild foo' if needed. It MUST only contain characters from semanticAlphabet per the semantic versioning spec.
Functions ¶
func NormalizeVerString ¶
NormalizeVerString returns the passed string stripped of all characters which are not valid according to the semantic versioning guidelines for pre-release version and build metadata strings. In particular they MUST only contain characters in semanticAlphabet.
func Version ¶
func Version() string
Version returns the application version as a properly formed string per the semantic versioning 2.0.0 spec (http://semver.org/).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.