Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildDate = ""
BuildDate as an iso-8601 string with seconds precision.
View Source
var GitCommit string
GitCommit defined dynamically by the Makefile
View Source
var GitDescribe string
GitDescribe is intended as the output of git describe --tags plus DIRTY if dirty.
View Source
var GitTreeState string
View Source
var GoVersion = runtime.Version()
GoVersion returns the version of the go runtime used to compile the binary
View Source
var Major string
View Source
var Minor string
OsArch returns the os and arch used to build the binary
View Source
var Patch string
View Source
var Version = strings.ReplaceAll(Major+"."+Minor+"."+Patch, "\n", "")
Version of this module for example "0.70.0"
Functions ¶
func GetVersion ¶
func GetVersion() string
Types ¶
type VersionBrief ¶
type VersionBrief struct { Version string `json:"version"` GitCommit string `json:"commit"` GitTreeState string `json:"tree"` }
func NewVersionBrief ¶
func NewVersionBrief() VersionBrief
type VersionInfo ¶
type VersionInfo struct { Version string `yaml:"Version"` GitCommit string `yaml:"Git Commit"` GitTreeState string `yaml:"Git Tree State"` GoVersion string `yaml:"Go Version"` BuildDate string `yaml:"Build Date"` Os string `yaml:"Os"` Arch string `yaml:"Arch"` }
func NewVersionInfo ¶
func NewVersionInfo() VersionInfo
NewVersionInfo returns a filled in struct for marshaling
Click to show internal directories.
Click to hide internal directories.