buildinfo

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppName is the friendly name of the app.
	//
	// Forks should consider using a different name.
	AppName = "Pat"

	// Version is the app's SemVer.
	//
	// Forks should NOT bump this unless they use a unique AppName. The Winlink
	// system uses this to derive the "these users should upgrade" wall of shame
	// from CMS connects.
	Version = "0.16.0"
)

Variables

View Source
var GitRev = func() string {
	if info, ok := debug.ReadBuildInfo(); ok {
		for _, setting := range info.Settings {
			if setting.Key == "vcs.revision" && len(setting.Value) > 7 {
				return setting.Value[:7]
			}
		}
	}
	return "unknown origin"
}()

GitRev is the git commit hash that the binary was built at.

Functions

func UserAgent

func UserAgent() string

UserAgent returns a suitable HTTP user agent string containing app name, SemVer, git rev, plus the Golang OS, architecture and version.

func VersionString

func VersionString() string

VersionString returns a very descriptive version including the app SemVer, git rev plus the Golang OS, architecture and version.

func VersionStringShort

func VersionStringShort() string

VersionStringShort returns the app SemVer and git rev.

Types

This section is empty.

Jump to

Keyboard shortcuts

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