version

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version       string
	GitCommit     string
	GitOrigin     string
	GitBranch     string
	CommitsBehind int
	IsFork        bool
	BuildDate     string
	GoVersion     string
}

Info contains version information for a binary.

func Get

func Get() Info

Get returns the version information for the current binary.

func (Info) Behind

func (i Info) Behind() string

Behind returns a human-readable description of how far behind upstream the build is: "unknown" if the check was not run, "up to date" if on the upstream tip, or "N commits" otherwise.

func (Info) String

func (i Info) String() string

String returns a single-line human-readable version string.

Jump to

Keyboard shortcuts

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