updates

package
v0.66.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 16 Imported by: 2 modules, 2 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Updater

type Updater struct {
	*common.Common
	Config    config.AppConfigurer
	OSCommand *oscommands.OSCommand
}

Updater checks for updates and does updates

func NewUpdater

func NewUpdater(cmn *common.Common, config config.AppConfigurer, osCommand *oscommands.OSCommand) (*Updater, error)

NewUpdater creates a new updater

func (*Updater) CheckForNewUpdate

func (u *Updater) CheckForNewUpdate(onFinish func(string, error) error, userRequested bool)

CheckForNewUpdate checks if there is an available update

func (*Updater) RecordLastUpdateCheck

func (u *Updater) RecordLastUpdateCheck() error

RecordLastUpdateCheck records last time an update check was performed

func (*Updater) Update

func (u *Updater) Update(newVersion string) error

Update downloads the latest binary and replaces the current binary with it

type Updaterer

type Updaterer interface {
	CheckForNewUpdate()
	Update()
}

Updaterer implements the check and update methods

Jump to

Keyboard shortcuts

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