version

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 5 Imported by: 3

Documentation

Overview

Package version provides variables which, when used correctly, provide build information about the application referencing this package. At compile time the appropriate linker flags must be passed:

go build -ldflags "-X github.com/axiomhq/pkg/version.release=1.0.0"

Adapt the flags for all other exported variables. Eventually use vendored version.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDate

func BuildDate() (time.Time, error)

BuildDate is a timestamp of the moment when the binary was built.

func BuildDateString

func BuildDateString() string

BuildDateString is BuildDate formatted as RFC3339.

func BuildUser

func BuildUser() string

BuildUser is the username of the user who performed the build.

func GoVersion

func GoVersion() string

GoVersion is the go version the build utilizes.

func Print

func Print(program string) string

Print returns version and build information in a user friendly, formatted string.

func Release

func Release() string

Release is the semantic version of the current build.

func Revision

func Revision() string

Revision is the last git commit hash of the source repository at the moment the binary was built.

func String

func String() string

String returns the version and build information.

Types

This section is empty.

Jump to

Keyboard shortcuts

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