selfupdate

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package selfupdate installs Surge releases from GitHub.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoUpdate            = errors.New("surge is already up to date")
	ErrUnsupportedPlatform = errors.New("self-update is not supported on this platform")
)

Functions

func Update

func Update(ctx context.Context, opts Options) (*version.UpdateInfo, error)

Update downloads, verifies, extracts, and installs the latest Surge release.

Types

type Options

type Options struct {
	CurrentVersion string
	ExecutablePath string
	Client         *http.Client
	VersionUpdater *version.Updater
	GOOS           string
	GOARCH         string
}

Options configures a self-update run.

Jump to

Keyboard shortcuts

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