version

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Unlicense Imports: 4 Imported by: 0

README

This package has a generator that queries the state of the Git repository and fills out a set of fields, useful for debugging and simple version/build information.

One of the fields gives the local path that runtime.Caller file value will have as prefix from the root of the repository so it can be elided from the code locations printed in the logs and instead show a relative path.

Notes

In connection with the short logger file location paths, there is regular expression/replacements available to add to Tilix (and possibly other terminals) that do not already impute the file location references to be for opening in one's usual IDE.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// URL is the git URL for the repository
	URL = "github.com/p9c/p9"
	// GitRef is the gitref, as in refs/heads/branchname
	GitRef = "refs/heads/main"
	// GitCommit is the commit hash of the current HEAD
	GitCommit = "40a7d8327e70dca9576a7257ad320106d62ee72f"
	// BuildTime stores the time when the current binary was built
	BuildTime = "2021-05-03T14:08:30+02:00"
	// Tag lists the Tag on the build, adding a + to the newest Tag if the commit is
	// not that commit
	Tag = "v0.0.2+"
	// PathBase is the path base returned from runtime caller
	PathBase = "/home/loki/src/github.com/cryptoconcurrency/chimera/"
	// Major is the major number from the tag
	Major = 0
	// Minor is the minor number from the tag
	Minor = 0
	// Patch is the patch version number from the tag
	Patch = 2
	// Meta is the extra arbitrary string field from Semver spec
	Meta = ""
)
View Source
var F, E, W, I, D, T log.LevelPrinter

Functions

func Get

func Get() string

Get returns a pretty printed version information string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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