version

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package version holds build-time metadata for flakehunter.

Index

Constants

This section is empty.

Variables

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

Populated at build time via -ldflags.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	BuildDate string `json:"buildDate"`
	GoVersion string `json:"goVersion"`
	Platform  string `json:"platform"`
}

Info bundles the version metadata reported by the version command.

func Current

func Current() Info

Current returns the version metadata for this binary.

Release builds inject the values above via -ldflags. A binary produced by `go install` gets no ldflags, so it would otherwise report "dev" forever — the module version and VCS stamps embedded by the toolchain are read back here to fill the gap.

func (Info) String

func (i Info) String() string

String renders the version info as a single human-readable line.

Jump to

Keyboard shortcuts

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