version

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package version provides build-time version information. These variables are set via ldflags at build time.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version (e.g., "1.0.0")
	Version = "dev"

	// Commit is the git commit SHA
	Commit = "none"

	// Date is the build date in RFC3339 format
	Date = "unknown"
)

Functions

func Full

func Full() string

Full returns the full version string for display.

func IsDev

func IsDev() bool

IsDev returns true if this is a development build.

func UserAgent

func UserAgent() string

UserAgent returns the user agent string for API requests.

Types

type SDKProvenance

type SDKProvenance struct {
	SDK struct {
		Module    string `json:"module"`
		Version   string `json:"version"`
		Revision  string `json:"revision"`
		UpdatedAt string `json:"updated_at"`
	} `json:"sdk"`
	API struct {
		Repo     string `json:"repo"`
		Revision string `json:"revision"`
		SyncedAt string `json:"synced_at"`
	} `json:"api"`
}

SDKProvenance contains SDK and API revision information embedded at build time.

func GetSDKProvenance

func GetSDKProvenance() *SDKProvenance

GetSDKProvenance returns the embedded SDK provenance information. Returns nil if the provenance data cannot be parsed.

Jump to

Keyboard shortcuts

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