version

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package version provides version information and build details for the application.

Index

Constants

View Source
const (
	// ShortCommitHashLength defines the length for shortened commit hashes
	ShortCommitHashLength = 7
	// UnknownValue represents unknown build information
	UnknownValue = "unknown"
)

Constants

Variables

View Source
var (
	Version     = "dev"
	Commit      = "unknown"
	Date        = "unknown"
	BuiltBy     = "unknown"
	BuildNumber = "0"
)

Build-time variables set by linker flags

Functions

func GetFullVersionInfo

func GetFullVersionInfo() string

GetFullVersionInfo returns detailed version information in modern format

func GetVersion

func GetVersion() string

GetVersion returns the complete version string

Types

type BuildInfo

type BuildInfo struct {
	Version   string
	Commit    string
	Date      string
	BuiltBy   string
	GoVersion string
	Platform  string
}

BuildInfo contains build information

func Get

func Get() *BuildInfo

Get returns the build information

func (*BuildInfo) Short

func (bi *BuildInfo) Short() string

Short returns a short version string

func (*BuildInfo) String

func (bi *BuildInfo) String() string

String returns a formatted version string

Jump to

Keyboard shortcuts

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