version

package
v0.0.0-...-fd752eb Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// BuildTimestamp ...
	BuildTimestamp = ""
	// GitCommit ...
	GitCommit = ""
	// GitBranch ...
	GitBranch = ""
	// GitRepo ...
	GitRepo = ""
	// VersionInfo ...
	VersionInfo = ""
)

Functions

func SetAppInfo

func SetAppInfo(name, description string)

SetAppInfo ...

func SetBuildInfo

func SetBuildInfo(timestamp string)

SetBuildInfo set build info

func SetGitInfo

func SetGitInfo(commit, branch, repo string)

SetGitInfo ...

func SetVersion

func SetVersion(ver string)

SetVersion ...

Types

type AppInfo

type AppInfo struct {
	Name        string
	Description string
}

AppInfo ...

func App

func App() AppInfo

App ...

func (AppInfo) String

func (app AppInfo) String() string

type BuildInfo

type BuildInfo struct {
	Timestamp time.Time
	Git       GitInfo
}

BuildInfo ...

func Build

func Build() BuildInfo

Build ...

func (BuildInfo) String

func (build BuildInfo) String() string

type GitInfo

type GitInfo struct {
	Commit string
	Branch string
	Repo   string
}

GitInfo ...

func Git

func Git() GitInfo

Git ...

func (GitInfo) String

func (git GitInfo) String() string

type Version

type Version struct {
	Raw    string
	Prefix string
	Major  int
	Minor  int
	Patch  int
}

Version ...

func Get

func Get() Version

Get ...

func (Version) String

func (ver Version) String() string

Jump to

Keyboard shortcuts

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