buildinfo

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package buildinfo exposes version metadata stamped into the binary at build time. Release builds (GoReleaser) set these via -ldflags -X; plain `go install` leaves them at their defaults and falls back to the module version recorded in the binary's build info.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commit

func Commit() string

Commit returns the git commit the binary was built from, or "" if unknown.

func Date

func Date() string

Date returns the build timestamp, or "" if unknown.

func Version

func Version() string

Version returns the release version, e.g. "v0.1.0". For `go install`-ed builds (where ldflags are not applied) it falls back to the module version recorded by the Go toolchain.

Types

This section is empty.

Jump to

Keyboard shortcuts

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