Help us shape the future of Go! Take the 2026 Go Developer Survey

updatewarn

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const EnvSuppress = "AL_SUPPRESS_UPDATE_WARNING"

EnvSuppress disables the best-effort update notice for machine-oriented execution contexts whose output must stay focused on the requested work.

Variables

View Source
var CachedCheckForUpdate = update.CachedCheck

CachedCheckForUpdate is the cached launch check seam for tests.

View Source
var CheckForUpdate = update.Check

CheckForUpdate is a seam for tests.

View Source
var RefreshUpdateCache = update.StartCacheRefresh

RefreshUpdateCache is the background refresh seam for tests.

Functions

func WarnCachedIfOutdated added in v1.0.0

func WarnCachedIfOutdated(ctx context.Context, currentVersion string, stderr io.Writer)

WarnCachedIfOutdated reads local release information and starts a bounded, silent refresh for the next launch. Cache misses and corruption are silent.

func WarnIfOutdated

func WarnIfOutdated(ctx context.Context, currentVersion string, stderr io.Writer)

WarnIfOutdated emits update warnings to stderr when a newer release is available. It is a best-effort warning and never returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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