version

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "unknown"
	Commit    = "unknown"
	BuildDate = "unknown"
)

Build-time variables set via -ldflags

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string    `json:"version"`
	Commit    string    `json:"commit"`
	BuildDate time.Time `json:"build_date"`
}

Info represents version information

func GetInfo

func GetInfo() Info

GetInfo returns the current version information

func (Info) IsNewer

func (i Info) IsNewer(other Info) bool

IsNewer returns true if this version info is newer than the other

func (Info) JSON

func (i Info) JSON() (string, error)

JSON returns the version info as JSON

func (Info) String

func (i Info) String() string

String returns the version info as a formatted string

Jump to

Keyboard shortcuts

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