up

package
v0.31.5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Updater

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

Updater checks a github repository for new releases and updates the current executable It is a wrapper around github.com/creativeprojects/go-selfupdate

func NewUpdater

func NewUpdater(repo string, version string) (*Updater, error)

NewUpdater creates a new updater for a github repository

func (*Updater) Check

func (u *Updater) Check(ctx context.Context) (*selfupdate.Release, error)

Check checks for a new release returns a release if there is one, or nil if there is no new release

func (*Updater) Update

func (u *Updater) Update(ctx context.Context, release *selfupdate.Release) error

Update updates the current executable to the latest release

Jump to

Keyboard shortcuts

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