version

package
v0.2.28 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 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 version exposes build metadata for the running dbrain binary.

Index

Constants

This section is empty.

Variables

View Source
var (
	ReleaseVersion = "unknown"
	BuildPlatform  = "unknown"

	// GitVersion is kept as a deprecated fallback for older build scripts that
	// used this misleading name for release/tag metadata.
	GitVersion = "unknown"
)

ReleaseVersion and BuildPlatform are injected by release/build commands because Go build info does not include them.

Functions

func GetCommit

func GetCommit() string

GetCommit returns the full git commit SHA when build info includes it.

func Info

func Info() map[string]interface{}

Info returns version information as a map for API-style payloads.

func ShortCommit

func ShortCommit() string

ShortCommit returns the first seven characters of the current commit.

func StartupLine

func StartupLine() string

StartupLine returns a concise human-readable build identifier for startup logs.

func UserAgent

func UserAgent(override string) string

UserAgent returns the HTTP user agent used for outbound API calls.

Types

type Details

type Details struct {
	Commit         string            `json:"commit"`
	Short          string            `json:"short"`
	BuildTime      string            `json:"build_time"`
	GitStatus      string            `json:"git_status"`
	GoVersion      string            `json:"go_version"`
	ReleaseVersion string            `json:"release_version"`
	BuildPlatform  string            `json:"build_platform"`
	ModulePath     string            `json:"module_path,omitempty"`
	ModuleVersion  string            `json:"module_version,omitempty"`
	BuildSettings  map[string]string `json:"build_settings,omitempty"`
}

Details describes build and version metadata embedded in the binary.

func Current

func Current() Details

Current returns build metadata for the running binary.

Jump to

Keyboard shortcuts

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