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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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