release

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 9 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 release looks up the latest published advisor release. It only reads: it never downloads or replaces the binary.

Index

Constants

View Source
const LatestURL = "https://api.github.com/repos/WoW-Companion/advisor/releases/latest"

LatestURL is the unauthenticated GitHub endpoint for the newest release.

Variables

This section is empty.

Functions

func Compare

func Compare(a, b string) (cmp int, ok bool)

Compare orders two dotted release numbers, ignoring a leading "v" and any "-suffix" or "+build" part. It returns ok=false when either is not made of numbers (a "dev" build).

Types

type Notice added in v0.3.0

type Notice struct {
	Available bool   `json:"available"`
	Latest    string `json:"latest"`
}

Notice is what the overlay's version line needs: whether to say a newer release is available, and which. A failed lookup, a development build or a release that is not newer all read as no notice, so the line stays quiet.

func NoticeFor added in v0.3.0

func NoticeFor(res Result, err error) Notice

NoticeFor decides the update notice from a lookup's outcome.

type Result

type Result struct {
	Latest string // the release tag, for example "v0.1.0"
	Newer  bool   // Latest is newer than the running version
	Known  bool   // the running version is a release number that can be compared
}

Result is what a lookup found.

func Check

func Check(ctx context.Context, client *http.Client, url, current string) (Result, error)

Check asks url for the latest release and compares it with current.

Jump to

Keyboard shortcuts

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