update

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package update handles self-update of the acli binary via GitHub Releases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(rel *Release) error

Install downloads and atomically replaces the current binary with the specified release's asset for the current GOOS/GOARCH.

Types

type Asset

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

Asset is a downloadable file attached to a release.

type Release

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

Release represents a GitHub release.

func LatestRelease

func LatestRelease(repo string) (*Release, error)

LatestRelease queries the GitHub Releases API and returns the latest release.

Jump to

Keyboard shortcuts

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