update

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchChangelog added in v0.9.0

func FetchChangelog(currentVersion, latestVersion string) string

FetchChangelog downloads CHANGELOG.md from GitHub and returns the sections for versions strictly greater than currentVersion and <= latestVersion.

func FetchLatestVersion

func FetchLatestVersion() (string, error)

FetchLatestVersion returns the latest published release tag from GitHub.

func StripV

func StripV(v string) string

StripV removes a leading "v" from a version string.

Types

type UpdateInfo added in v0.9.0

type UpdateInfo struct {
	LatestVersion string // e.g. "v0.8.5"
	Changelog     string // relevant CHANGELOG.md sections (trimmed markdown)
}

UpdateInfo holds the result of a successful update check when a newer version exists.

func CachedUpdateCheck added in v0.9.0

func CachedUpdateCheck(currentVersion string) (*UpdateInfo, error)

CachedUpdateCheck returns update info when a newer version is available. Returns nil, nil if already on the latest version, or if the check fails silently (no network, GitHub unreachable, etc.). Network fetches are rate-limited to once per 24 hours via a cache file at config.UpdateCheckFile().

Jump to

Keyboard shortcuts

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