version

package
v0.1.42 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const MinSDKVersion = "0.1.0"

Minimum SDK version this CLI supports

Variables

View Source
var (
	Version   = "dev"
	BuildTime = "unknown"
	GitCommit = "unknown"
)

Build-time variables (set via ldflags during CI/CD builds)

Functions

func AutoUpdate added in v0.1.42

func AutoUpdate(release *LatestRelease) bool

AutoUpdate automatically updates to the specified release without prompting. Returns true if an update was performed.

func PrintVersion

func PrintVersion()

func PromptAndUpdate added in v0.1.42

func PromptAndUpdate(release *LatestRelease) bool

PromptAndUpdate prompts the user to update and performs the update if confirmed. Returns true if an update was performed.

func SelfUpdate added in v0.1.42

func SelfUpdate(release *LatestRelease) error

SelfUpdate downloads and installs the specified release.

Types

type LatestRelease added in v0.1.42

type LatestRelease struct {
	Version     string `json:"version"`
	PublishedAt string `json:"published_at"`
	URL         string `json:"url"`
}

LatestRelease represents the response from the version check endpoint.

func CheckForUpdate added in v0.1.42

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

CheckForUpdate checks if a newer version is available. Returns the latest release info if an update is available, nil otherwise.

Jump to

Keyboard shortcuts

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