version

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2018 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GitCommit contains the git commit of this version.
	// It's set by make.
	GitCommit = ""

	// Version contains a semantic version number, must follow // https://semver.org/.
	// It's set by make.
	Version = ""

	// Appendix is appended after a hypen to the version number. It can be
	// used to mark a build as a prerelease.
	Appendix = ""

	// CurSemVer is the current version
	CurSemVer = SemVer{}
)

Functions

This section is empty.

Types

type SemVer

type SemVer struct {
	Major     int
	Minor     int
	Patch     int
	Appendix  string
	GitCommit string
}

SemVer holds a semantic version

func SemVerFromString

func SemVerFromString(ver string) (*SemVer, error)

SemVerFromString returns the SemVer representation of a string

func (*SemVer) Short

func (s *SemVer) Short() string

Short returns the version without GitCommit

func (*SemVer) String

func (s *SemVer) String() string

String returns the string representation

Jump to

Keyboard shortcuts

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