app

package
v0.0.0-...-c9303cd Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package app provides vars that can be populated via "-X" linker flags to provide global application metadata, such as build time or version.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoBuildTime is the error returned when no build time for the current
	// binary was set.
	ErrNoBuildTime = errors.New("build time not known")
)

Functions

func BuildTime

func BuildTime() (time.Time, error)

BuildTime returns the time that the binary of the current process was built. Our build script populates the `buildTime` var used to provide this result.

func Version

func Version() string

Version returns the build version of the binary executing the current process. Our build script populates the `version` var, if a version tag is set. If not populated, a generic "devel" value will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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