Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DetectLatestFunc = DefaultDetectLatest
DetectLatestFunc is the injectable function used to check for a new release. Replace in tests to avoid hitting the GitHub API.
View Source
var HomebrewCheckerFunc = DefaultHomebrewChecker
HomebrewCheckerFunc is the injectable function used to detect Homebrew installs. Replace in tests to avoid touching the real filesystem.
Functions ¶
func DefaultDetectLatest ¶
func DefaultDetectLatest(slug string) (*selfupdate.Release, bool, error)
DefaultDetectLatest calls the real go-selfupdate API.
func DefaultHomebrewChecker ¶
func DefaultHomebrewChecker() bool
DefaultHomebrewChecker is the real Homebrew detection using the current executable path.
func NewUpdateCmd ¶
NewUpdateCmd creates the `kh update` cobra command.
func TestableIsHomebrewInstall ¶
TestableIsHomebrewInstall exposes the path-check logic for unit tests without touching the real filesystem. It accepts an already-resolved path.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.