buildinfo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package buildinfo reports the version control revision that the Go toolchain stamps into a binary at build time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RevisionFromSettings

func RevisionFromSettings(settings []debug.BuildSetting) (revision string, modified bool)

RevisionFromSettings reads the commit the toolchain stamps into a binary built inside a repository, and whether that tree carried uncommitted changes. A build made outside a repository carries no stamp, which is reported as an unknown revision so the log line always has a value.

func RunningBuild

func RunningBuild() (revision string, modified bool)

RunningBuild reports the stamp of the binary that is executing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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