Documentation
¶
Overview ¶
Package version is the single source of truth for the baifo binary's build metadata: semantic version, commit SHA and build timestamp.
The three fields are stamped at link time by goreleaser / the Makefile via -ldflags:
-X github.com/achetronic/baifo/internal/version.tag=v0.4.1 -X github.com/achetronic/baifo/internal/version.commit=ab12cd3 -X github.com/achetronic/baifo/internal/version.date=2026-05-22T15:14:11Z
Anything in the codebase that needs to brand outgoing requests, surface "what version am I running", or persist a versioned record should import from here. Defining the variables once means renaming or restamping is a single-file change.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Commit ¶
func Commit() string
Commit returns the short git SHA the binary was compiled from, e.g. "ab12cd3". Useful for bug reports that need to be tied back to a specific commit when the tag alone is too coarse (snapshot builds, between-tag CI artefacts).
Types ¶
This section is empty.