update

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package update provides self-update functionality for the CLI.

Index

Constants

This section is empty.

Variables

View Source
var ErrDevVersion = errors.New("cannot update development builds")

ErrDevVersion is returned when trying to update a development build.

Functions

func ApplyUpdate

func ApplyUpdate(ctx context.Context, rel *Release) error

ApplyUpdate downloads and applies the update.

func GetPlatformInfo

func GetPlatformInfo() (os, arch string)

GetPlatformInfo returns the current OS and architecture.

Types

type Release

type Release struct {
	Version     string
	ReleaseURL  string
	ReleaseDate string
	Description string
	AssetURL    string
	AssetName   string
	// contains filtered or unexported fields
}

Release contains information about an available update.

func CheckForUpdate

func CheckForUpdate(ctx context.Context, currentVersion string) (*Release, error)

CheckForUpdate checks if a newer version is available on GitHub Releases.

Jump to

Keyboard shortcuts

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