selfupdate

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package selfupdate implements `dockercmd --self-upgrade`: download the latest GitHub release asset for this OS/arch, verify its SHA-256 and atomically replace the running executable.

Self-update executes downloaded code, so the checksum check is mandatory: the binary is only swapped in once its SHA-256 matches the digest GitHub records for the asset. The download lands in the target directory (same filesystem) so the final swap is an atomic rename.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, current string, w io.Writer, checkOnly bool) error

Run checks for a newer release and, unless checkOnly is set, downloads and installs it. Progress is written to w; it is a no-op (with a message) when the running version is already current.

Types

This section is empty.

Jump to

Keyboard shortcuts

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