updater

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitHubRepo   = "iyulab/oops"
	GitHubAPIURL = "https://api.github.com/repos/" + GitHubRepo + "/releases/latest"
)

Variables

This section is empty.

Functions

func DownloadAndInstall

func DownloadAndInstall(asset *Asset) error

DownloadAndInstall downloads and installs the update

func GetAssetName

func GetAssetName() string

GetAssetName returns the expected asset name for current OS/arch

Types

type Asset

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

Asset represents a release asset

func FindAsset

func FindAsset(release *Release) *Asset

FindAsset finds the appropriate asset for current platform

type Release

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

Release represents a GitHub release

func CheckForUpdate

func CheckForUpdate(currentVersion string) (*Release, bool, error)

CheckForUpdate checks if a newer version is available

Jump to

Keyboard shortcuts

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