build

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const IssuesURL = "https://github.com/mike76-dev/hostscore/issues"

IssuesURL is the URL of the location where issues and bugs should be reported.

View Source
const (
	// MaxEncodedVersionLength is the maximum length of a version string encoded
	// with the encode package. 100 is much larger than any version number we send
	// now, but it allows us to send additional information in the version string
	// later if we choose. For example appending the version string with the HEAD
	// commit hash.
	MaxEncodedVersionLength = 100
)

Variables

View Source
var (
	// GitRevision is the git commit hash used when built.
	GitRevision string
	// BuildTime is the date and time the build was completed.
	BuildTime string
)

GitRevision and BuildTime get assigned via the Makefile when built.

View Source
var (
	// NodeBinaryName is the name of the node binary. It is supplied at compile
	// time via ldflags.
	NodeBinaryName = "unknown"

	// NodeVersion is the current version of the node software. It is supplied
	// at compile time via ldflags.
	NodeVersion = "?.?.?"

	// ClientBinaryName is the name of the client binary. It is supplied at compile
	// time via ldflags.
	ClientBinaryName = "unknown"

	// ClientVersion is the current version of the client software. It is supplied
	// at compile time via ldflags.
	ClientVersion = "?.?.?"
)

Functions

func IsVersion

func IsVersion(str string) bool

IsVersion returns whether str is a valid release version with no -rc component.

func VersionCmp

func VersionCmp(a, b string) int

VersionCmp returns an int indicating the difference between a and b. It follows the convention of bytes.Compare and big.Cmp:

-1 if a <  b
 0 if a == b
+1 if a >  b

One important quirk is that "1.1.0" is considered newer than "1.1", despite being numerically equal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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