version

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildHost string = "unknown"

BuildHost stores the hostname of the machine where the binary was built. Set via -ldflags "-X github.com/OpenCHAMI/magellan/internal/version.BuildHost=$(hostname)"

View Source
var BuildTime string = strftime.Format("%Y-%m-%dT%H:%M:%SZ", time.Now())

BuildTime stores the build timestamp in UTC. Set via -ldflags "-X github.com/OpenCHAMI/magellan/internal/version.BuildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ)"

View Source
var BuildUser string = "unknown"

BuildUser is the username of the person or system that initiated the build process. Set via -ldflags "-X github.com/OpenCHAMI/magellan/internal/version.BuildUser=$(whoami)"

View Source
var GitBranch string = "unknown"

GitBranch holds the name of the Git branch from which the build was created. Set via -ldflags "-X github.com/OpenCHAMI/magellan/internal/version.GitBranch=$(git rev-parse --abbrev-ref HEAD)"

View Source
var GitCommit string = "unknown"

GitCommit stores the latest Git commit hash. Set via -ldflags "-X github.com/OpenCHAMI/magellan/internal/version.GitCommit=$(git rev-parse HEAD)"

View Source
var GitState string = "unknown"

GitState indicates whether the working directory was "clean" or "dirty" (i.e., with uncommitted changes). Set via -ldflags "-X github.com/OpenCHAMI/magellan/internal/version.GitState=$(if git diff-index --quiet HEAD --; then echo 'clean'; else echo 'dirty'; fi)"

View Source
var GitTag string = "unknown"

GitTag represents the most recent Git tag at build time, if any. Set via -ldflags "-X github.com/OpenCHAMI/magellan/internal/version.GitTag=$(git describe --tags --abbrev=0)"

View Source
var GoVersion string = "unknown"

GoVersion captures the Go version used to build the binary. Typically, this can be obtained automatically with runtime.Version(), but you can set it manually. Set via -ldflags "-X github.com/OpenCHAMI/magellan/internal/version.GoVersion=$(go version | awk '{print $3}')"

View Source
var Version string = "unknown"

Version indicates the version of the binary, such as a release number or semantic version. Set via -ldflags "-X github.com/OpenCHAMI/magellan/internal/version.Version=v1.0.0"

Functions

func PrintVersionInfo

func PrintVersionInfo()

PrintVersionInfo outputs all versioning information for troubleshooting or version checks.

func VersionInfo

func VersionInfo() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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