update

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func NewUpdateCmd(f *cmdutil.Factory) *cobra.Command

NewUpdateCmd creates the `kh update` cobra command.

func TestableIsHomebrewInstall

func TestableIsHomebrewInstall(resolvedPath string) bool

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.

Jump to

Keyboard shortcuts

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