version

package
v0.0.0-...-8cb9352 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullVersion

func FullVersion() string

FullVersion returns a formatted string with full version details, including the application version, build date, Git commit hash, the Go runtime version, and the operating system and architecture details.

Example output: Clido version dev Build date: unknown Git commit: unknown Go version: go1.16.4 OS/Arch: linux/amd64.

Types

type Info

type Info struct {
	Version   string // The version of the application
	BuildDate string // The date when the application was built
	GitCommit string // The Git commit hash corresponding to the build
}

Info represents the build information for the application. It includes fields for the version, build date, and Git commit.

func Get

func Get() Info

Get returns an Info struct containing the current build information. By default, it returns "dev" for the version, and "unknown" for the build date and Git commit. These values can be replaced at build time using linker flags.

Jump to

Keyboard shortcuts

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