update

package
v0.13.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchLatest added in v0.13.4

func FetchLatest(ctx context.Context) (tag string, url string, err error)

FetchLatest queries GitHub Releases and returns the latest stable tag and URL. It expects that the GitHub API returns releases in descending chronological order (newest first), which is standard behavior.

func IsNewerVersion added in v0.13.4

func IsNewerVersion(current, latest string) (bool, error)

IsNewerVersion reports whether latest > current using semver rules.

func MaybeShowMessage

func MaybeShowMessage(ctx context.Context, currentVersion string, frequency time.Duration)

MaybeShowMessage orchestrates cache, fetch, compare, and printing. It is designed to be non-fatal and fast; errors are swallowed.

func SuggestUpgradeCommand added in v0.13.2

func SuggestUpgradeCommand() string

SuggestUpgradeCommand attempts to infer how the user installed kernel and returns a tailored upgrade command. Falls back to default brew command on unknown.

Types

type Cache

type Cache struct {
	LastChecked      time.Time `json:"last_checked"`
	LastShownVersion string    `json:"last_shown_version"`
}

Cache stores update-check metadata to throttle frequency and avoid repeating the same banner too often.

type InstallMethod added in v0.13.4

type InstallMethod string

InstallMethod represents how kernel was installed

const (
	InstallMethodBrew    InstallMethod = "brew"
	InstallMethodPNPM    InstallMethod = "pnpm"
	InstallMethodNPM     InstallMethod = "npm"
	InstallMethodBun     InstallMethod = "bun"
	InstallMethodUnknown InstallMethod = "unknown"
)

func DetectInstallMethod added in v0.13.4

func DetectInstallMethod() (InstallMethod, string)

DetectInstallMethod detects how kernel was installed and returns the method along with the path to the kernel binary.

Jump to

Keyboard shortcuts

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