update

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadUpdate

func DownloadUpdate(release *Release) (string, error)

DownloadUpdate downloads the Windows binary from the release

func HasInternet

func HasInternet() bool

HasInternet checks if there's an internet connection by trying GitHub.

func InstallUpdate

func InstallUpdate(updatePath string) error

InstallUpdate replaces the current executable with the new one

Types

type Asset

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

Asset represents a release asset

type Release

type Release struct {
	TagName string `json:"tag_name"`
	Name    string `json:"name"`
	HTMLURL string `json:"html_url"`
	Assets  []Asset
}

Release represents a GitHub release

func CheckForUpdates

func CheckForUpdates(currentVersion string) (*Release, error)

CheckForUpdates checks if a new version is available on GitHub

Jump to

Keyboard shortcuts

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