version

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Set at build time via -ldflags by goreleaser and the Makefile. When they are left at these defaults (go install, plain go build), String reads the version Go embeds in the binary instead.

Functions

func String

func String() string

String is the one-line form printed by `inode version`.

Types

type Info

type Info struct {
	Version string
	Commit  string
	Date    string
}

Info is the resolved version of the running binary.

func Get

func Get() Info

Get resolves the version: ldflags values when set, otherwise the module version and VCS stamp from runtime/debug.ReadBuildInfo.

func (Info) String

func (i Info) String() string

Jump to

Keyboard shortcuts

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