Documentation
¶
Overview ¶
Package appversion unifies common versions for all binaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintExit ¶
func PrintExit()
PrintExit prints version to stdout and os.Exit(0) if have `-version` flag. Call it after `flag.Parse()`.
func VersionFlag ¶
func VersionFlag() bool
VersionFlag indicate whether expect to print version and exit. Call it after `flag.Prase()` to make sure command line parameters available.
Types ¶
type VersionInfo ¶
type VersionInfo struct {
AppVersion string `json:"app version"`
BuildTime string `json:"build time"`
GitCommit string `json:"git commit"`
}
VersionInfo represents version information structure.
Click to show internal directories.
Click to hide internal directories.