Documentation ¶
Overview ¶
Package version provides utilities for displaying version information about a Go application.
To use this package, a program would set the package variables at build time, using the -ldflags go build flag.
Example:
go build -ldflags "-X github.com/kolide/kit/version.version=1.0.0"
Available values and defaults to use with ldflags:
version = "unknown" branch = "unknown" revision = "unknown" goVersion = "unknown" buildDate = "unknown" buildUser = "unknown" appName = "unknown"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Info ¶
type Info struct { Version string `json:"version"` Branch string `json:"branch"` Revision string `json:"revision"` GoVersion string `json:"go_version"` BuildDate string `json:"build_date"` BuildUser string `json:"build_user"` }
Info is a structure with version build information about the current application.
Click to show internal directories.
Click to hide internal directories.