updater

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package updater provides automatic update functionality for the Finn daemon. It checks GitHub releases on startup and applies updates seamlessly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Restart

func Restart() error

Restart replaces the current process with a new instance. On Unix systems, this uses syscall.Exec which replaces the current process entirely - no new PID is created.

Types

type Result

type Result struct {
	Updated        bool
	CurrentVersion string
	NewVersion     string
	Error          error
}

Result contains information about the update check result.

func CheckAndUpdate

func CheckAndUpdate(currentVersion string) Result

CheckAndUpdate checks for updates and applies them if available. Returns a Result indicating what happened.

The update process: 1. Query GitHub releases for the latest version 2. Compare with current version 3. If newer, download the archive 4. Validate SHA256 checksum 5. Replace current binary 6. Return success (caller should restart)

Jump to

Keyboard shortcuts

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