update

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndNotifyUpdate

func CheckAndNotifyUpdate(currentVersion string)

CheckAndNotifyUpdate performs a non-blocking update check and notifies user if update available This is called automatically during normal CLI usage to keep users informed Network failures are silently ignored to avoid disrupting normal operation

func CheckForUpdate

func CheckForUpdate(currentVersion string) (available bool, latestVersion string, err error)

CheckForUpdate queries GitHub API for the latest release and compares versions

func Update

func Update(currentVersion string, verbose bool) error

Update downloads and installs the latest version

Types

type ReleaseInfo

type ReleaseInfo struct {
	TagName string `json:"tag_name"`
	Name    string `json:"name"`
	Assets  []struct {
		Name               string `json:"name"`
		BrowserDownloadURL string `json:"browser_download_url"`
	} `json:"assets"`
}

ReleaseInfo represents GitHub release metadata

type UpdateCheckCache

type UpdateCheckCache struct {
	LastCheck       time.Time `json:"last_check"`
	LatestVersion   string    `json:"latest_version"`
	UpdateAvailable bool      `json:"update_available"`
}

UpdateCheckCache stores the last update check information

Jump to

Keyboard shortcuts

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