version

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package version provides build metadata injected via ldflags.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "dev"
	Commit    = "unknown"
	BuildDate = "unknown"
)

Values set at build time via -ldflags.

Functions

func OverrideVersionForTesting

func OverrideVersionForTesting(current string) func()

OverrideVersionForTesting swaps the reported version until the returned restore function is called. Tests must call the restore function.

Types

type Info

type Info struct {
	Version   string
	Commit    string
	BuildDate string
}

Info describes the current build metadata.

func Current

func Current() Info

Current returns the active build metadata snapshot.

func (Info) String

func (i Info) String() string

String returns a readable single-line build summary.

Jump to

Keyboard shortcuts

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