version

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package version exposes build-time metadata (version, commit, build time).

These vars are overridden at link time via -ldflags:

-X github.com/sunholo-data/ailang/internal/version.Version=vX.Y.Z
-X github.com/sunholo-data/ailang/internal/version.Commit=<sha>
-X github.com/sunholo-data/ailang/internal/version.BuildTime=<iso>

For `go run` / `go test` invocations without ldflags, init() populates Commit/BuildTime from runtime/debug.ReadBuildInfo() when available so the module cache key still differentiates between builds. If no VCS info is available (e.g. outside a git checkout), Commit stays "dev" and the source-hash component of the cache key still catches edits.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the release version (e.g. "v0.11.4"). "dev" for unreleased builds.
	Version = "dev"
	// Commit is the git commit SHA the binary was built from.
	Commit = "dev"
	// BuildTime is the ISO-8601 build timestamp.
	BuildTime = "unknown"
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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