Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version is the current version of the application. // It can be overridden by ldflags at build time. Version = "dev" // CommitHash is the git commit hash at build time. // It can be overridden by ldflags at build time. CommitHash = "" // BuildTime is the time when the application was built. // It can be overridden by ldflags at build time. BuildTime = "" )
Functions ¶
func EnsureBuildInfo ¶
func EnsureBuildInfo()
EnsureBuildInfo populates CommitHash and BuildTime from Go build info when they were not set via ldflags.
func GetInfo ¶
func GetInfo() string
GetInfo returns a formatted version string including the version and commit hash.
func ShortCommitHash ¶
func ShortCommitHash() string
ShortCommitHash returns the first 7 characters of the commit hash.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.