selfupdate

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: MIT Imports: 14 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 selfupdate downloads a newer ipsupport-code binary from GitHub Releases and replaces the running executable in place. It picks the release channel (stable = the latest tagged release, nightly = the rolling pre-release) and the asset for this machine's OS/arch, verifies the SHA-256, and atomically swaps the binary.

Index

Constants

View Source
const (
	Stable  = "stable"
	Nightly = "nightly"
)

Channels.

View Source
const Repo = "ipsupport-llc/ipsupport-code"

Repo is the GitHub "owner/name" releases are pulled from.

Variables

This section is empty.

Functions

func Apply

func Apply(ctx context.Context, rel Release, hc *http.Client) (string, error)

Apply downloads the release asset, verifies its checksum, and replaces the running executable. It returns the path of the replaced binary.

Types

type Release

type Release struct {
	Version   string // e.g. "v0.1.0" or "nightly-20260627-9aa8de9"
	AssetName string // the .tar.gz asset name
	AssetURL  string
	SumsURL   string
}

Release is the resolved newest build on a channel for this OS/arch.

func Latest

func Latest(ctx context.Context, repo, channel string, hc *http.Client) (Release, error)

Latest resolves the newest release on the channel and the asset for this machine. A nil client uses http.DefaultClient.

Jump to

Keyboard shortcuts

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