version

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package version exposes the build metadata injected at compile time via ldflags. These values are set by the Makefile using:

-ldflags "-X github.com/lowplane/kerno/internal/version.Version=v0.1.0 ..."

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version (e.g., "v0.1.0"). Set at build time.
	Version = "dev"

	// Commit is the short git commit hash. Set at build time.
	Commit = "unknown"

	// Date is the build date in ISO 8601 format. Set at build time.
	Date = "unknown"
)

Build-time values injected via -ldflags.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	Date      string `json:"date"`
	GoVersion string `json:"goVersion"`
	OS        string `json:"os"`
	Arch      string `json:"arch"`
}

Info holds structured build metadata.

func Get

func Get() Info

Get returns the current build information.

func (Info) Short

func (i Info) Short() string

Short returns just "kerno <version>".

func (Info) String

func (i Info) String() string

String returns a human-readable version string.

Jump to

Keyboard shortcuts

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