version

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev" // Version is set at build time via ldflags
	Commit  = ""    // Commit is set at build time via ldflags
)

Functions

func Display

func Display() string

Display returns the full version info including Go version and OS/Arch.

func Short added in v0.3.2

func Short() string

Short returns the version with optional commit hash on one line.

func UserAgent

func UserAgent() string

UserAgent returns a User-Agent string for HTTP requests.

Types

type UpdateInfo

type UpdateInfo struct {
	CurrentVersion string `json:"current_version,omitempty"`
	LatestVersion  string `json:"latest_version,omitempty"`
	DownloadURL    string `json:"download_url,omitempty"`
	Available      bool   `json:"available"`
}

func CheckForUpdate

func CheckForUpdate(ctx context.Context) (*UpdateInfo, error)

CheckForUpdate returns the latest published CLI release when it is newer than the current binary version. The release metadata is cached in the global Semantica config directory to keep local commands fast and usable while offline.

Jump to

Keyboard shortcuts

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