version

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version (e.g., "1.0.0")
	Version = "dev"
	// Commit is the git commit SHA
	Commit = "unknown"
	// Date is the build date
	Date = "unknown"
)

Version information set at build time via ldflags

Functions

func Full

func Full() string

Full returns the full version string

func Short

func Short() string

Short returns a short version string

Types

type Info

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

Info contains the full version information

func GetInfo

func GetInfo() Info

GetInfo returns the full version information

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