version

package
v0.51.79 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package version reports the build identity of the running binary.

Release binaries are stamped by goreleaser through -ldflags. Container images are built by ko, which passes no ldflags, so those fall back to the VCS metadata the Go toolchain stamps into every build. Nothing is read from the environment on purpose: a deploy-time value is a claim about the binary rather than a property of it, and can drift from the artifact it describes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version string
	Commit  string
	Date    string
}

Info is the build identity of the running binary. Any field may be empty, and callers must render accordingly.

func Get

func Get() Info

Get resolves the build identity, preferring ldflags when they were injected.

Jump to

Keyboard shortcuts

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