version

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package version — build-time version stamp, one source of truth.

`go build` / `go install` of the main command package leaves Version = "dev". Releases stamp real values via ldflags:

go build -ldflags "\
    -X github.com/theboringhumane/theboringfloor/internal/version.Version=0.1.0 \
    -X github.com/theboringhumane/theboringfloor/internal/version.Commit=$(git rev-parse --short HEAD) \
    -X github.com/theboringhumane/theboringfloor/internal/version.Date=$(date -u +%F)" ./cmd/<main>

-X only rewrites package-level string vars — keep these as `var`, not `const`.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version — semver of the build ("0.1.0" or "v0.1.0"); "dev" = tree build.
	Version = "dev"
	// Commit — short git SHA of the build.
	Commit = "unknown"
	// Date — build date (YYYY-MM-DD).
	Date = "unknown"
)

Stamped via -X at release time (see package doc).

Functions

func String

func String() string

String — one-line display for `theboringfloor --version`:

dev build: "theboringfloor dev"
stamped:   "theboringfloor v0.1.0 (abc1234, 2026-08-22)"

Types

This section is empty.

Jump to

Keyboard shortcuts

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