Documentation
¶
Overview ¶
Package version are used to generate version information
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReleaseVersion ¶
func ReleaseVersion() string
func ShortString ¶
func ShortString() string
Types ¶
type Info ¶ added in v0.2.9
type Info struct {
ReleaseVersion string `json:"releaseVersion" yaml:"releaseVersion"` // Such as "v1.2.3-3836f877"
GitVersion string `json:"gitVersion" yaml:"gitVersion"` // Such as "v1.2.3"
GitCommit string `json:"gitCommit" yaml:"gitCommit"` // Such as "3836f8770ab8f488356b2129f42f2ae5c1134bb0"
GitTreeState string `json:"gitTreeState,omitempty" yaml:"gitTreeState,omitempty"` // Such as "clean", "dirty"
BuildTime string `json:"buildTime" yaml:"buildTime"` // Such as "2021-10-20 18:24:03"
Runtime RuntimeInfo `json:"runtime,omitempty" yaml:"runtime,omitempty"`
}
Info contains versioning information. following attributes:
ReleaseVersion - "vX.Y.Z-00000000" used to indicate the last release version,
containing GitVersion and GitCommitShort.
GitVersion - "vX.Y.Z" used to indicate the last git tag.
GitCommit - The git commit id corresponding to this source code.
GitTreeState - "clean" indicates no changes since the git commit id
"dirty" indicates source code changes after the git commit id
func (*Info) ShortString ¶ added in v0.2.9
type RuntimeInfo ¶
type RuntimeInfo struct {
GoVersion string `json:"goVersion,omitempty" yaml:"goVersion,omitempty"`
GOOS string `json:"GOOS,omitempty" yaml:"GOOS,omitempty"`
GOARCH string `json:"GOARCH,omitempty" yaml:"GOARCH,omitempty"`
NumCPU int `json:"numCPU,omitempty" yaml:"numCPU,omitempty"`
Compiler string `json:"compiler,omitempty" yaml:"compiler,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.