version

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package version carries the build-time identity of the barqr binary.

The variables in this package are overwritten at link time via -ldflags "-X github.com/el-amin-dev/barqr/internal/version.Version=..." so that a released binary can report exactly what it was built from.

Index

Constants

View Source
const Name = "barqr"

Name is the product name reported by /v1/version and the User-Agent header.

Variables

View Source
var (
	// Version is the semantic version of the release, e.g. "v1.2.3".
	Version = "dev"
	// Commit is the git revision the binary was built from.
	Commit = "none"
	// Date is the RFC 3339 build timestamp, or "unknown".
	Date = "unknown"
)

Build-time identity. Defaults describe a plain `go build` with no ldflags.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	Date      string `json:"date"`
	Go        string `json:"go"`
	Platform  string `json:"platform"`
	Name      string `json:"name"`
	UserAgent string `json:"-"`
}

Info is the machine-readable build identity, as served by /v1/version.

func Get

func Get() Info

Get returns the build identity of the running binary.

func (Info) String

func (i Info) String() string

String renders the build identity as a single human-readable line.

Jump to

Keyboard shortcuts

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