updater

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUpdateAsync

func CheckUpdateAsync(currentVersion string)

CheckUpdateAsync asynchronously checks for an update if 24 hours have passed since the last check.

func PromptIfAvailable

func PromptIfAvailable(currentVersion string, cmdName string)

PromptIfAvailable prints an update prompt if a newer version is available and constraints are met.

Types

type UpdateCache

type UpdateCache struct {
	LatestVersion string    `json:"latest_version"`
	LastChecked   time.Time `json:"last_checked"`
	LastPrompted  time.Time `json:"last_prompted"`
}

UpdateCache stores the cache for latest version check.

Jump to

Keyboard shortcuts

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