version

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPrintFunc = cliVersionPrinter
)

Functions

func GetBuildDate added in v0.0.2

func GetBuildDate() string

GetBuildDate return build date

func GetCommitID added in v0.0.2

func GetCommitID() string

GetCommitID return git commit id

func GetVersionCode added in v0.0.2

func GetVersionCode() int

GetVersionCode return version code

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

func (v *Version) GetBuildDate() string

GetBuildDate return build date

func (*Version) GetCommitID added in v0.0.3

func (v *Version) GetCommitID() string

GetCommitID return git commit id

func (*Version) GetVersionCode added in v0.0.3

func (v *Version) GetVersionCode() int

GetVersionCode return version code

func (*Version) GetVersionName added in v0.0.3

func (v *Version) GetVersionName() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL