selfupdate

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 13 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 updates the running binary from GitHub releases: pick the asset for this OS/arch, verify its SHA256 against the release's SHA256SUMS, and atomically swap it in via rename (a fresh inode — replacing a signed binary in place would get the process SIGKILLed on macOS).

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("no release asset for this platform")

ErrUnsupported reserved for platforms without release assets.

Functions

func AssetName

func AssetName() string

AssetName is the release asset for this platform.

func Notice

func Notice(currentVersion string) string

Notice returns a one-line upgrade hint when a newer release exists, checking GitHub at most once per day. Errors and the disable env var yield "". Meant for fire-and-forget use on serve startup.

func Run

func Run(currentVersion string, checkOnly bool, out io.Writer) error

Run checks the latest release and, unless checkOnly, replaces the current executable with it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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