version

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package version provides build version information.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version of the build.
	Version = "dev"
	// Commit is the git commit hash of the build.
	Commit = "unknown"
	// BuildTime is the time the binary was built.
	BuildTime = "unknown"
)

Build-time variables, set via ldflags.

Functions

func Full

func Full() string

Full returns the full version string.

func Short

func Short() string

Short returns a short version string.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	BuildTime string `json:"buildTime"`
	GoVersion string `json:"goVersion"`
	OS        string `json:"os"`
	Arch      string `json:"arch"`
}

Info contains the version information.

func Get

func Get() Info

Get returns the version information.

func (Info) String

func (i Info) String() string

String returns a human-readable version string.

Jump to

Keyboard shortcuts

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