version

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Brand is an identifier that is used to identify the organisation or
	// entity that built the binary.
	//
	// Official binaries built by Hemi Labs, Inc. use the brand "Hemi Labs".
	// If you are building your own specialised version of our binaries, please
	// set this to something that uniquely identifies who you are.
	//
	// This helps us see when people are building on our work, and making their
	// own specialised versions of our packages. We cannot wait to see what you
	// are able to create!
	//
	// This should be set at link-time using:
	//
	//	-ldflags "-X 'github.com/hemilabs/heminetwork/version.Brand=my brand'"
	Brand string

	// Component is an identifier for the binary.
	//
	// This should be set in an init function in the main package:
	//
	//	func init() {
	//	    version.Component = "bfgd"
	//	}
	Component string
)
View Source
var (
	Major = "1"
	Minor = "0"
	Patch = "0"
)

Defines the application version number. These are set at link-time by GoReleaser for releases.

View Source
var BuildMetadata = ""

BuildMetadata defines additional build metadata. It is modified at link time for official releases. It must only contain characters from the semantic version alphabet.

View Source
var PreRelease = "dev"

PreRelease contains the prerelease name of the application. It is a variable, so it can be modified at link time (e.g. `-ldflags "-X github.com/hemilabs/heminetwork/version.PreRelease=rc1"`). It must only contain characters from the semantic version alphabet.

Functions

func BuildInfo added in v0.3.2

func BuildInfo() string

BuildInfo returns a string containing information about the build.

func String

func String() string

String returns the application version as a properly formed string per the semantic versioning 2.0.0 spec (https://semver.org/).

func UserAgent added in v0.3.2

func UserAgent() string

UserAgent returns an HTTP User-Agent header value that should be used when making HTTP requests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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