version

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "dev"             // Version is the semantic version (e.g., "1.2.3")
	GitCommit = "unknown"         // GitCommit is the git commit hash
	BuildDate = "unknown"         // BuildDate is the build timestamp
	GoVersion = runtime.Version() // GoVersion is the Go version used to build
)

Build information. Populated at build-time via ldflags.

Functions

func String

func String() string

String returns a human-readable version string

Types

type Info

type Info struct {
	Version   string `json:"version"`
	GitCommit string `json:"git_commit"`
	BuildDate string `json:"build_date"`
	GoVersion string `json:"go_version"`
}

Info returns version information as a struct

func Get

func Get() Info

Get returns the version information

Jump to

Keyboard shortcuts

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