versionutil

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   string
	GitCommit string
	BuildDate string
	GitState  string
)

These fields are populated by govvv at compile-time in main and must be set in here to be shared across all packages.

Functions

func DetailedVersionString

func DetailedVersionString() string

DetailedVersionString returns a detailed version string including version number, git commit, build date, source tree state and the go runtime version.

func ExtractFromServiceDefinition

func ExtractFromServiceDefinition(content string, ctx *log.Context) (string, error)

Extracts the installed version of run command from the service definition. Current extracting it from the ExecStart field that includes the version as a substring.

func Initialize

func Initialize(version string, gitCommit string, buildDate string, gitState string)

func VersionString

func VersionString() string

VersionString builds a compact version string in format: vVERSION/git@GitCommit[-State].

Types

This section is empty.

Jump to

Keyboard shortcuts

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