version

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BranchString is set by -ldflags in the Makefile - it contains the branch
	// at the time the project was built.
	BranchString string
	// VersionString is set by -ldflags in the Makefile - it contains the
	// latest version (tag or short rev) at the time the project was built.
	VersionString string
	// RevString is set by -ldflags in the Makefile - it contains the full git
	// revision at the time the project was built.
	RevString string
)

Functions

This section is empty.

Types

type Version

type Version struct {
	Branch      string
	Rev         string
	Programname string
	Version     string
}

The Version struct contains data that is set when building via `-ldflags` in the Makefile. The struct member names indicate what data is included in this list.

func NewVersion

func NewVersion() *Version

NewVersion returns a Version instance with values set based on the `-ldflags` and some sensible defaults.

Jump to

Keyboard shortcuts

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