updates

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 16 Imported by: 2

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