Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultPrintFunc = cliVersionPrinter
)
Functions ¶
func GetVersionName ¶ added in v0.0.2
func GetVersionName() string
GetVersionName return SemVer specs version name
func WithCliVersion ¶
func WithCliVersion(c *cli.App) *cli.App
WithCliVersion set version name to *cli.App instance
Types ¶
type Version ¶ added in v0.0.3
type Version struct { // VersionName VersionName string // VersionCode VersionCode string // CommitID CommitID string // BuildDate BuildDate string }
Version instance
func (*Version) GetBuildDate ¶ added in v0.0.3
GetBuildDate return build date
func (*Version) GetCommitID ¶ added in v0.0.3
GetCommitID return git commit id
func (*Version) GetVersionCode ¶ added in v0.0.3
GetVersionCode return version code
func (*Version) GetVersionName ¶ added in v0.0.3
GetVersionName return SemVer specs version name
func (*Version) WithCliVersion ¶ added in v0.0.3
func (v *Version) WithCliVersion(c *cli.App) *cli.App
WithCliVersion set version name to *cli.App instance
Click to show internal directories.
Click to hide internal directories.