version

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version variable will be replaced at link time after `make` has been run.
	Version = "latest"

	// GitHash variable will be replaced at link time after `make` has been run.
	GitHash = "<NOT PROPERLY GENERATED>"

	// BuildType should be one of (dev, release).
	BuildType = buildDev
)
View Source
var InfoVar = Info{
	{"Version", Version},
	{"GitHash", GitHash},
	{"BuildType", BuildType},
	{"GoVersion", runtime.Version()},
	{"OS", runtime.GOOS},
	{"Architecture", runtime.GOARCH},
}

InfoVar is a singleton instance of the Info struct.

Functions

func IsDevBuild

func IsDevBuild() bool

IsDevBuild returns true if this is a development (local) build.

func IsReleaseBuild

func IsReleaseBuild() bool

IsReleaseBuild returns true if this is a release build.

Types

type Info

type Info [][2]string

Info has properties about the build and runtime.

func RuntimeVar added in v0.19.0

func RuntimeVar() Info

RuntimeVar returns the InfoVar plus runtime information like uptime.

func (Info) String

func (i Info) String() string

String returns a formatted string, with linebreaks, intended to be displayed on stdout.

Jump to

Keyboard shortcuts

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