Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchLatest ¶ added in v0.13.4
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
IsNewerVersion reports whether latest > current using semver rules.
func MaybeShowMessage ¶
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.