Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AppName is the friendly name of the app. // // Forks should consider using a different name. AppName = "Pat" // Version is the app's SemVer. // // Forks should NOT bump this unless they use a unique AppName. The Winlink // system uses this to derive the "these users should upgrade" wall of shame // from CMS connects. Version = "0.16.0" )
Variables ¶
View Source
var GitRev = func() string { if info, ok := debug.ReadBuildInfo(); ok { for _, setting := range info.Settings { if setting.Key == "vcs.revision" && len(setting.Value) > 7 { return setting.Value[:7] } } } return "unknown origin" }()
GitRev is the git commit hash that the binary was built at.
Functions ¶
func UserAgent ¶
func UserAgent() string
UserAgent returns a suitable HTTP user agent string containing app name, SemVer, git rev, plus the Golang OS, architecture and version.
func VersionString ¶
func VersionString() string
VersionString returns a very descriptive version including the app SemVer, git rev plus the Golang OS, architecture and version.
func VersionStringShort ¶
func VersionStringShort() string
VersionStringShort returns the app SemVer and git rev.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.