version

package
v0.1.0-proto2m Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GAPIVersion      = "dev"
	GoADKVersion     = "dev"
	PythonADKVersion = "dev"
	BuildTag         = "dev"
	SchemaHash       = "unknown"
	Commit           = "unknown"
	Date             = "unknown"
	BuiltBy          = "unknown"
)

Injected at build time via -ldflags

Functions

func BinaryVersion

func BinaryVersion() string

BinaryVersion returns the registered version string for the current binary.

func KernelVersion

func KernelVersion() string

KernelVersion reports the version of the gapi kernel this binary embeds, which is not always this binary's own version: goblin vendors the kernel and stamps only internal/version.Version, so before this existed `goblind version` answered "dev" - in the release that first embedded the new kernel. See GAPI-DIV-066.

Resolution order:

  1. The stamped GAPIVersion, when it is not the placeholder. gapi's own builds set it deliberately and must not be second-guessed.
  2. The gapi entry in the binary's build info - as the main module for gapi's binaries, as a dependency for goblin's.
  3. The placeholder.

Step 2 deliberately adds NO new stamp point. The value comes from the module graph, so it cannot drift from the module actually linked; an eighth hand-maintained ldflag would be the same defect class that MAGELIB-DIV-006 spent a release closing.

func SetBinaryNameAndVersion

func SetBinaryNameAndVersion(name, version string)

SetBinaryNameAndVersion lets a binary like gapictl override the top-level label

func SetBuildMetadata

func SetBuildMetadata(overrides Info)

SetBuildMetadata lets downstream components override specific build details

func Summary

func Summary() string

Summary prints a single version block, merging binary and GAPI info

Types

type Info

type Info struct {
	Name      string
	Version   string
	Commit    string
	BuildDate string
	BuiltBy   string
	GoVersion string
	Platform  string
}

Jump to

Keyboard shortcuts

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