Documentation
¶
Overview ¶
Package version provides application release and build metadata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version is the application release version. Can be set via -ldflags at build time. Version = "dev" // Commit is the git commit SHA. Can be set via -ldflags at build time. Commit = "none" // BuildDate is the RFC3339 build or commit timestamp. Can be set via -ldflags at build time. BuildDate = "unknown" )
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
Version string `json:"version"`
Commit string `json:"commit"`
BuildDate string `json:"buildDate"`
GoVersion string `json:"goVersion"`
Platform string `json:"platform"`
}
Info contains build and runtime version information.
func Get ¶
func Get() Info
Get returns the current version and build information, falling back to runtime build info if build-time variables are unset.
Click to show internal directories.
Click to hide internal directories.