notification

package
v0.74.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VersionChecker

type VersionChecker struct {
	// contains filtered or unexported fields
}

func NewVersionChecker

func NewVersionChecker(commandName string, cliOptions *flag.Options) *VersionChecker

NewVersionChecker creates a new VersionChecker with the default updates API URL.

func (*VersionChecker) Announcements

func (v *VersionChecker) Announcements() []announcement

func (*VersionChecker) CurrentVersion added in v0.64.0

func (v *VersionChecker) CurrentVersion() (semver.Version, error)

func (*VersionChecker) LatestVersion

func (v *VersionChecker) LatestVersion() (semver.Version, error)

func (*VersionChecker) PrintNotices

func (v *VersionChecker) PrintNotices(ctx context.Context, output io.Writer)

PrintNotices prints any announcements or warnings to the output writer, most likely stderr

func (*VersionChecker) RunUpdateCheck

func (v *VersionChecker) RunUpdateCheck(ctx context.Context)

RunUpdateCheck makes a best efforts request to determine the latest version and any announcements Logic: 1. if SkipVersionCheck AND DisableTelemetry are both true, skip the request 2. if SkipVersionCheck is true AND DisableTelemetry is false, send the request with telemetry headers but suppress the version check output 3. if SkipVersionCheck is false AND DisableTelemetry is true, run the version check but don't send any telemetry identifiers

func (*VersionChecker) Warnings

func (v *VersionChecker) Warnings() []string

Jump to

Keyboard shortcuts

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