Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAndNotify ¶
CheckAndNotify performs a version check and notifies the user if a newer version is available. This is the main entry point for the version check system. The function is silent on all errors to avoid interrupting CLI operations.
func UpdateCommandForCurrentBinary ¶ added in v0.7.8
UpdateCommandForCurrentBinary returns the shell command that updates this binary, based on how it was installed.
The fallback receives the exec path as the OS reports it (not normalized), so the Windows installer hint can name the directory the binary lives in.
func UpdateCommandShell ¶ added in v0.10.6
func UpdateCommandShell() string
UpdateCommandShell names the shell UpdateCommandForCurrentBinary's command has to run in, or "" when any shell will do. Callers that print the command instead of running it need it: the Windows commands are PowerShell one-liners, and pasting one into cmd.exe or bash either fails or, in bash's case, expands part of the command before PowerShell sees it.
Types ¶
type AutoUpdateAction ¶ added in v0.6.0
type AutoUpdateAction string
AutoUpdateAction describes the result of an update prompt.
type GitHubRelease ¶
GitHubRelease represents the GitHub API response for a release.
type VersionCache ¶
type VersionCache struct {
LastCheckTime time.Time `json:"last_check_time"`
SkippedVersion string `json:"skipped_version,omitempty"`
}
VersionCache represents the cached version check data.