version

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

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).

func Date

func Date() string

Date returns the ISO-8601 UTC build timestamp. Stamped by goreleaser; "unknown" otherwise.

func Tag

func Tag() string

Tag returns the semantic version of this build, e.g. "v0.4.1" for a release or "dev" when run uninstrumented. Use this for User-Agent strings, the --version subcommand and any other surface where a human or operator wants to know what they're looking at.

Types

This section is empty.

Jump to

Keyboard shortcuts

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