update

package
v0.6.13 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package update implements self-update for the supermodel binary.

It fetches the latest release from GitHub, downloads the archive for the current OS/arch, extracts the binary, and atomically replaces the running executable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check() (latest string, err error)

Check fetches the latest release tag and returns it. Does not download anything.

func Run

func Run() (updated bool, err error)

Run checks for a newer release and, if found, downloads and installs it. Returns (true, nil) when an update was installed, (false, nil) when already up to date, and (false, err) on failure.

Types

type Asset

type Asset struct {
	Name               string `json:"name"`
	BrowserDownloadURL string `json:"browser_download_url"`
}

Asset is a single release artifact.

type Release

type Release struct {
	TagName string  `json:"tag_name"`
	Assets  []Asset `json:"assets"`
}

Release is the subset of the GitHub releases API response we need.

Jump to

Keyboard shortcuts

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