update

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldAttemptUpdate added in v0.8.0

func ShouldAttemptUpdate(ctx context.Context, p *core.Printer, dur time.Duration) (bool, error)

ShouldAttemptUpdate returns true if the application hasn't checked for an update longer than the provided duration.

func Update

func Update(ctx context.Context, p *core.Printer, timeout time.Duration, silent bool) int

Update checks the API for the latest fetch version and upgrades the current executable in-place, returning the exit code to use.

Types

type Asset added in v0.5.0

type Asset struct {
	Name string `json:"name"`
	URL  string `json:"browser_download_url"`
}

type Release added in v0.5.0

type Release struct {
	TagName string  `json:"tag_name"`
	Assets  []Asset `json:"assets"`
}

Jump to

Keyboard shortcuts

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