Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewVersionCmd ¶
NewVersionCmd creates a custom version command that respects the global -O flag.
Types ¶
type VersionInfo ¶
type VersionInfo struct {
Version string `json:"version"`
GitCommit string `json:"gitCommit"`
GoVersion string `json:"goVersion"`
Platform string `json:"platform"`
Compiler string `json:"compiler"`
BuildDate string `json:"buildDate"`
CommitDate string `json:"commitDate"`
DirtyBuild bool `json:"dirtyBuild"`
}
VersionInfo represents the version information structure.
func GetVersionInfo ¶
func GetVersionInfo() *VersionInfo
GetVersionInfo gathers version information using the same approach as go.szostok.io/version/extension.
Click to show internal directories.
Click to hide internal directories.