version

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: GPL-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// This will be set during build time via -ldflags.
	Version = "dev"

	// This will be set during build time via -ldflags.
	Commit = "unknown"

	// This will be set during build time via -ldflags.
	Date = "unknown"
)

Functions

func ValidateVersion

func ValidateVersion()

If version is not "dev", it must be a valid semantic version or the program will crash.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	Date      string `json:"date"`
	GoVersion string `json:"go_version"`
	Platform  string `json:"platform"`
}

Info contains version information.

func Get

func Get() Info

Get returns the current version information.

func (Info) String

func (i Info) String() string

String returns a human-readable version string with version on first line.

Jump to

Keyboard shortcuts

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