buildinfo

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package buildinfo holds version and build metadata stamped at compile time via ldflags.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "dev"
	GitCommit = "unknown"
	GitBranch = "unknown"
	BuildTime = "unknown"
	Changelog = "" // commits since last release tag, semicolon-separated
)

These variables are set at build time via -ldflags.

Functions

func BuildInfo

func BuildInfo() map[string]string

BuildInfo returns compile-time and platform metadata. This is the static information appropriate for "thane version" output.

func ContextString added in v0.4.0

func ContextString() string

ContextString returns a compact multi-line summary for system prompt injection. Includes version, build status, and changelog when available.

func RuntimeInfo

func RuntimeInfo() map[string]string

RuntimeInfo returns build metadata plus runtime state (uptime, etc.). Use this for health endpoints and status pages.

func String

func String() string

String returns a one-line summary for logging.

func Uptime

func Uptime() time.Duration

Uptime returns the duration since process start.

func UserAgent added in v0.2.3

func UserAgent() string

UserAgent returns an HTTP User-Agent string suitable for outgoing requests. Format follows the convention: ProductName/Version (+URL).

Types

This section is empty.

Jump to

Keyboard shortcuts

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