version

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package version exposes build version and commit metadata injected at compile time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveVersion

func DeriveVersion(in string) string

DeriveVersion normalizes a version string from build info. Handles various version formats including semantic versions, pseudo-versions, and dev builds. Returns "dev" for unrecognized formats or pure pseudo-versions without a base tag.

func GetCommitHash

func GetCommitHash() string

GetCommitHash returns the short commit hash (7 characters) from build info. Returns "unknown" if commit information is not available.

func GetVersion

func GetVersion() string

GetVersion returns the application version derived from build info. Returns "dev" if version information is not available.

Types

This section is empty.

Jump to

Keyboard shortcuts

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