version

package
v0.3.88 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "dev"
	GitCommit = "unknown"
	BuildTime = "unknown"
)

Set via ldflags at build time:

go build -ldflags "-X github.com/CTJaeger/KleverNodeHub/internal/version.Version=v0.1.0
  -X github.com/CTJaeger/KleverNodeHub/internal/version.GitCommit=abc1234
  -X github.com/CTJaeger/KleverNodeHub/internal/version.BuildTime=2026-03-11T17:00:00Z"
View Source
var StartTime = time.Now()

StartTime records when the process started.

Functions

func Uptime

func Uptime() time.Duration

Uptime returns how long the process has been running.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	GitCommit string `json:"git_commit"`
	BuildTime string `json:"build_time"`
	GoVersion string `json:"go_version"`
	OS        string `json:"os"`
	Arch      string `json:"arch"`
}

Info holds structured build information.

func Get

func Get() Info

Get returns the current build information.

Jump to

Keyboard shortcuts

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