version

package
v0.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Raw is the string representation of the version. This will be replaced with the calculated version at build time.
	Raw = "v0.1.0-alpha.1"

	// Version is semver representation of the version.
	Version = semver.MustParse(strings.TrimLeft(Raw, "v"))
)

Functions

func PrintShortCleanVersionInfo

func PrintShortCleanVersionInfo() string

func PrintShortDirtyVersionInfo

func PrintShortDirtyVersionInfo() string

func PrintVerboseVersionInfo

func PrintVerboseVersionInfo() string

Types

type Info

type Info struct {
	Major            string `json:"major,omitempty"`
	Minor            string `json:"minor,omitempty"`
	GitVersion       string `json:"gitVersion,omitempty"`
	GitCommit        string `json:"gitCommit,omitempty"`
	GitTreeState     string `json:"gitTreeState,omitempty"`
	BuildDate        string `json:"buildDate,omitempty"`
	GoVersion        string `json:"goVersion,omitempty"`
	Compiler         string `json:"compiler,omitempty"`
	Platform         string `json:"platform,omitempty"`
	GitReleaseTag    string `json:"gitReleaseTag,omitempty"`
	GitReleaseCommit string `json:"gitReleaseCommit,omitempty"`
	GitBranch        string `json:"gitBranch,omitempty"`
}

func GetVersionInfo

func GetVersionInfo() Info

func (Info) String

func (info Info) String() string

Jump to

Keyboard shortcuts

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