buildstamp

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package buildstamp exports build metadata values that may be optionally set by the build system, for runtime inspection. The primary usecase is for identifying application provenance (e.g. what branch, user built the code).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrUnofficialBuild added in v0.0.4

type ErrUnofficialBuild struct {
	// contains filtered or unexported fields
}

func (ErrUnofficialBuild) Error added in v0.0.4

func (e ErrUnofficialBuild) Error() string

type Vars

type Vars struct {
	ReleaseVersion string
	SourceBranch   string
	SourceRevision string
	IsClean        bool
	IsOfficial     bool
	BuildTimestamp time.Time
}
var (
	Values Vars

	ErrStampingDisabled = errors.New("build metadata is unavailable (build with bazel's `--stamp` flag to enable)")
)

func (Vars) GetVersion added in v0.0.4

func (v Vars) GetVersion() (string, error)

func (Vars) String

func (v Vars) String() string

Jump to

Keyboard shortcuts

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