version

package
v0.103.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildDate = ""

BuildDate as an iso-8601 string with seconds precision.

View Source
var GitCommit string

GitCommit defined dynamically by the Makefile

View Source
var GitDescribe string

GitDescribe is intended as the output of git describe --tags plus DIRTY if dirty.

View Source
var GitTreeState string
View Source
var GoVersion = runtime.Version()

GoVersion returns the version of the go runtime used to compile the binary

View Source
var Major string
View Source
var Minor string
View Source
var OsArch = fmt.Sprintf("%s %s", runtime.GOOS, runtime.GOARCH)

OsArch returns the os and arch used to build the binary

View Source
var Patch string
View Source
var Version = strings.ReplaceAll(Major+"."+Minor+"."+Patch, "\n", "")

Version of this module for example "0.70.0"

Functions

func GetVersion

func GetVersion() string

Types

type VersionBrief

type VersionBrief struct {
	Version      string `json:"version"`
	GitCommit    string `json:"commit"`
	GitTreeState string `json:"tree"`
}

func NewVersionBrief

func NewVersionBrief() VersionBrief

type VersionInfo

type VersionInfo struct {
	Version      string `yaml:"Version"`
	GitCommit    string `yaml:"Git Commit"`
	GitTreeState string `yaml:"Git Tree State"`
	GoVersion    string `yaml:"Go Version"`
	BuildDate    string `yaml:"Build Date"`
	Os           string `yaml:"Os"`
	Arch         string `yaml:"Arch"`
}

func NewVersionInfo

func NewVersionInfo() VersionInfo

NewVersionInfo returns a filled in struct for marshaling

Jump to

Keyboard shortcuts

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