updater

package
v0.1.98 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareVersions

func CompareVersions(a, b string) int

CompareVersions returns 1 if a > b, -1 if a < b, 0 if equal. Both versions may optionally start with "v".

func DownloadURLForVersion

func DownloadURLForVersion(ver string) string

DownloadURLForVersion returns the download URL for a specific version. ver may optionally include the "v" prefix (e.g. "0.3.0" or "v0.3.0").

func Install

func Install(url string, w io.Writer) error

Install downloads the archive at url, extracts the bce binary, and atomically replaces the currently-running executable.

Types

type ReleaseInfo

type ReleaseInfo struct {
	Version     string // e.g. "0.2.0" (v prefix stripped)
	DownloadURL string
}

ReleaseInfo holds the latest release version and the download URL for the current platform.

func CheckLatest

func CheckLatest() (*ReleaseInfo, error)

CheckLatest resolves the latest release by following the /releases/latest redirect, extracting the version tag from the final URL. This avoids the GitHub API rate limit.

Jump to

Keyboard shortcuts

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