version

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package version provides the canonical version string for the yaad binary.

Source of truth: the VERSION file at the repo root, and the matching git tag created by release-please. Release tooling injects the version into the binary at build time via ldflags:

go build -ldflags " \
  -X github.com/GrayCodeAI/yaad/internal/version.Version=$(cat VERSION) \
  -X github.com/GrayCodeAI/yaad/internal/version.Commit=$(git rev-parse --short HEAD) \
  -X github.com/GrayCodeAI/yaad/internal/version.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ)"

Goreleaser does this automatically during release builds. The defaults below ("dev", "none", "unknown") apply only to local builds without ldflags so a fresh `go build` still produces a runnable binary.

Index

Constants

This section is empty.

Variables

View Source
var Commit = "none"

Commit is the git commit short SHA. Set via ldflags at release time.

View Source
var Date = "unknown"

Date is the build date in RFC3339. Set via ldflags at release time.

View Source
var Version = "dev"

Version is the current version of yaad. Set via ldflags at release time.

Functions

func Full

func Full() string

Full returns a verbose, human-readable version string suitable for `yaad --version` output.

func String

func String() string

String returns just the version string (kept for backwards compatibility with existing call sites that do `fmt.Printf("yaad v%s", version.String())`).

Types

This section is empty.

Jump to

Keyboard shortcuts

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