version

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 11 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 CLI version string shown to users.

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