version

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Overview

Package version exposes funcd's build identity. Version/Commit/Date are written at link time via -ldflags "-X …version.Version=…" (the one sanctioned mutable-globals seam — ADR-0002 §5 / ADR-0026); GoVersion + Platform come from the runtime. An un-stamped build returns the honest "dev"/"none"/"unknown" defaults so it's obvious.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = "none"
	Date    = "unknown"
)

The ldflags-stamp seam. //nolint is required — gochecknoglobals fires on these names (same inline form as the lookup-table globals in api/fault/problem.go, pkg/sdk/kinds.go).

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string
	Commit    string
	Date      string
	GoVersion string
	Platform  string
}

Info is the assembled build identity.

func Get

func Get() Info

Get returns this build's Info: the stamp vars plus the runtime-derived Go version and OS/arch (always filled, even on an un-stamped build).

func (Info) String

func (i Info) String() string

String renders the build identity as one human line.

Jump to

Keyboard shortcuts

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