build

package
v0.3.0-docs.0...-f96dd80 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const TimeFormat = "2006/01/02 15:04:05"

TimeFormat is the reference format for build.Time. Make sure it stays in sync with the string passed to the linker in the goreleaser config file

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	GoVersion   string
	Tag         string
	Time        string
	Revision    string
	CgoCompiler string
	Platform    string
}

Info stores the build information

func GetInfo

func GetInfo() Info

GetInfo returns an Info struct populated with the build information.

func (Info) GoTime

func (i Info) GoTime() time.Time

GoTime parses the utcTime string and returns a time.Time.

func (Info) Short

func (i Info) Short() string

Short returns a pretty printed build and version summary.

func (Info) Timestamp

func (i Info) Timestamp() (int64, error)

Timestamp parses the utcTime string and returns the number of seconds since epoch.

Jump to

Keyboard shortcuts

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