update

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package update provides background version checking against GitHub releases. The check runs asynchronously and caches its result for 24 hours so it never adds latency to any command. A notice is printed to stderr when a newer version is available.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAsync

func CheckAsync(currentVersion string) <-chan string

CheckAsync fires a background goroutine that checks for a newer release. If one is found and the check has not been performed in the last 24 hours, it sends a human-readable notice to noticeC. The caller should drain noticeC after the command completes and print any message to stderr.

func Upgrade added in v0.6.4

func Upgrade(currentVersion string) error

Upgrade checks for a newer release and installs it. If the binary was installed via Homebrew it delegates to `brew upgrade`. Otherwise it downloads the appropriate archive from GitHub Releases, verifies its SHA-256 checksum, and atomically replaces the running binary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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