Documentation ¶
Overview ¶
Package versioninfo 提供对版本信息的一些操作
Index ¶
Constants ¶
View Source
const Path = "internal/version/info.go"
Path 指定版本化文件的路径
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VersionInfo ¶
type VersionInfo struct {
// contains filtered or unexported fields
}
VersionInfo 版本信息的相关数据
func (*VersionInfo) DumpFile ¶
func (v *VersionInfo) DumpFile(ver string) error
DumpFile 输出版本信息文件
ver 为需要指定的版本号
func (*VersionInfo) LDFlags ¶
func (v *VersionInfo) LDFlags() (string, error)
LDFlags 获取 ldflags 的参数
返回格式为:
-X xx.buildDate=20060102 xx.commitHash=adfaewfwex
Click to show internal directories.
Click to hide internal directories.