buildinfo

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package buildinfo is the version backd was built as, the same for both binaries.

Index

Constants

View Source
const Dev = "dev"

Dev is the version of a build from a working tree.

Variables

View Source
var Version = "dev"

Version is set at build time (-ldflags "-X github.com/fernandezvara/backd/internal/buildinfo.Version=v1.2.3") by releases and the Dockerfiles. Read it with Get, which falls back to the module version.

Functions

func Commit

func Commit() string

Commit is the VCS revision the binary was built from ("unknown" when the build has none, such as a container build without .git).

func Compare

func Compare(a, b string) (int, bool)

Compare orders two semantic versions (a leading "v" is optional) by semver precedence: -1, 0 or +1, and ok false when either isn't one.

func Get

func Get() string

Get is the version of this binary: the release-stamped one, else the module version a `go install …@vX.Y.Z` records, else "dev" (a build from a working tree, "(devel)").

Types

This section is empty.

Jump to

Keyboard shortcuts

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