Documentation
¶
Index ¶
Constants ¶
View Source
const ( // 未设置版本. VersionNotSet versionValue = 0 // 启用版本. VersionEnabled versionValue = 1 // 原始版本. VersionRaw versionValue = 2 )
定义一些常量.
Variables ¶
This section is empty.
Functions ¶
func PrintAndExitIfRequested ¶
func PrintAndExitIfRequested()
PrintAndExitIfRequested 将检查是否传递了 `--version` 标志,如果是,则打印版本并退出.
func VersionVar ¶
VersionVar 定义了一个具有指定名称和用法的标志.
Types ¶
type Info ¶
type Info struct {
GitVersion string `json:"gitVersion"`
GitCommit string `json:"gitCommit"`
GitTreeState string `json:"gitTreeState"`
BuildDate string `json:"buildDate"`
GoVersion string `json:"goVersion"`
Compiler string `json:"compiler"`
Platform string `json:"platform"`
}
Info 包含了版本信息.
Click to show internal directories.
Click to hide internal directories.