version

package
v0.15.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FormatYAML = "yaml"
	FormatJSON = "json"
)

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

func Commit

func Commit() string

func Number

func Number() string

func Print

func Print(cmd *cobra.Command, format string) error

func Text

func Text() string

Text returns a human-readable version string for display purposes.

Types

type Info

type Info struct {
	Number    string `json:"version" yaml:"version"`
	Commit    string `json:"commit" yaml:"commit"`
	GoVersion string `json:"goversion" yaml:"goversion"`
}

func Get

func Get() Info

func (Info) Format

func (v Info) Format(format string) (string, error)

func (Info) Text

func (v Info) Text() string

Jump to

Keyboard shortcuts

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