version

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: GPL-2.0 Imports: 3 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

func LoadPackageVars added in v0.11.1

func LoadPackageVars() error

LoadPackageVars parses the package variable and sets CurSemVer

Types

type SemVer

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

SemVer holds a semantic version

func FromString added in v0.11.1

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

FromString 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