notifications

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MPL-2.0 Imports: 19 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

Overview

Package notifications displays release notices in eligible interactive sessions. It offers update actions for recognized Homebrew and Go installations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result int

Result describes what the caller should do after running the notification flow.

const (
	// ResultContinue allows the requested sloctl command to run.
	ResultContinue Result = iota
	// ResultExitSuccess exits after a successful update.
	ResultExitSuccess
	// ResultInterrupted exits after the user cancels the update prompt.
	ResultInterrupted
)

func Notify

func Notify(currentVersion string) (result Result)

Notify checks for a newer release in eligible interactive sessions and reports whether the caller should continue or exit. Checks are best-effort and cached; recognized Homebrew and Go installations may offer an interactive update action.

Jump to

Keyboard shortcuts

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