update

package
v1.0.28 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 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

Overview

Package update checks GitHub for a newer Equinox release and can download and silently install one. It is used by the desktop application; the server variant only checks.

Index

Constants

This section is empty.

Variables

View Source
var APIURL = "https://api.github.com/repos/Ozzvin/equinox/releases/latest"

APIURL is a var so tests can point it at a fake server.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version string // e.g. "1.0.6", without the leading "v"
	Notes   string // the release's own description (Markdown)
	URL     string // the release's page, for a manual download
	// contains filtered or unexported fields
}

Info describes a GitHub release that is newer than the version currently running.

func Check

func Check(ctx context.Context, force bool) (*Info, error)

Check reports the latest GitHub release if it is newer than the running version, or nil if not (or if the check fails). A result is cached for an hour unless force is set, so opening the settings repeatedly does not hit GitHub every time.

func CheckWithin added in v1.0.19

func CheckWithin(ctx context.Context, force bool, maxAge time.Duration) (*Info, error)

CheckWithin is Check with the age up to which a cached result is good enough.

func (*Info) Install

func (i *Info) Install(ctx context.Context, dir string, relaunch bool) error

Install downloads the installer and its checksum into dir, verifies it against the checksum published in the same release, and runs it silently. The installer's own InitializeSetup closes this process once it starts (see installer/equinox.iss), so the caller does not need to exit separately. When relaunch is true, the installer reopens Equinox once the update is in place (see the IsAutoUpdate check in equinox.iss).

type Progress added in v1.0.8

type Progress struct {
	// Phase is one of "downloading", "verifying", "installing", "error" ("" before any
	// install has been attempted this run).
	Phase   string  `json:"phase"`
	Percent float64 `json:"percent"` // 0..1, meaningful only while Phase is "downloading"
	Err     string  `json:"error,omitempty"`
}

Progress describes how an in-progress Install call is going, for a UI to poll.

func CurrentProgress added in v1.0.8

func CurrentProgress() Progress

CurrentProgress reports the state of the most recent Install call.

Jump to

Keyboard shortcuts

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