provenance

package
v0.0.0-...-b7fcf81 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provenance

type Provenance struct {
	// Version is the value from VERSION file
	Version string `json:"version"`
	// GitCommit is the output from `git rev-parse HEAD`
	GitCommit string `json:"gitCommit"`
	// BuildDate is output from  `date -u +'%Y-%m-%dT%H:%M:%SZ'`
	BuildDate string `json:"buildDate"`
	// OS holds the operating system name.
	OS string `json:"goOs"`
	// Platform holds architecture name.
	Platform string `json:"goArch"`
	// GitTag refers to tag on a git branch
	GitTag string `json:"gitTag"`
	// GitTreeState is the tree state of git branch/tag
	GitTreeState string `json:"gitTreeState"`
	// Compiler is the go compiler
	Compiler string `json:"compiler"`
	// GoVersion is the version of go language
	GoVersion string
}

Provenance holds information about the build of an executable.

func GetProvenance

func GetProvenance() Provenance

GetProvenance returns an instance of Provenance.

func (Provenance) Print

func (v Provenance) Print(w io.Writer)

Print prints the provenance of the ocibuilder

func (Provenance) PrintVerbose

func (v Provenance) PrintVerbose(w io.Writer)

PrintVerbose prints the verbose provenance of the ocibuilder

func (Provenance) String

func (v Provenance) String() string

String outputs the version as a string

Jump to

Keyboard shortcuts

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