updater

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultUpgradeConfirmCb = func(current, target releaser.Version) bool { return true }

Functions

func CheckForUpdates

func CheckForUpdates(targetPath string, current releaser.Version, client *releaser.Client, upgradeCb UpgradeConfirmCB) error

CheckForUpdates checks for updates and applies it if available. If the upgradeCb is not nil, it will prompt the user for confirmation before applying the update. If an update is applied, it will restart the application with the new version. If no update is available, it will return nil. If an error occurs during the update process, it will return the error.

Types

type UpgradeConfirmCB

type UpgradeConfirmCB func(current, target releaser.Version) bool

UpgradeConfirmCB is a function that is called when an update is ready to be applied.

Jump to

Keyboard shortcuts

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