updatecheck

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 14 Imported by: 0 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

This section is empty.

Functions

func MaybeNotify

func MaybeNotify(ctx context.Context, stderr io.Writer, currentVersion string, style Style)

MaybeNotify checks whether a newer release is available and prints an update notice to stderr when a fresh cached result indicates the user should upgrade. It never blocks for longer than a short bounded wait on a stale cache.

func Prefetch added in v0.5.0

func Prefetch(ctx context.Context, currentVersion string)

Prefetch starts refreshing a stale update cache in the background so the network round trip overlaps the command instead of delaying its exit. Call it before running the command; MaybeNotify picks up the result.

Types

type Style

type Style struct {
	Bold func(string) string
	Dim  func(string) string
}

Style controls optional terminal styling for the notice output.

Jump to

Keyboard shortcuts

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