ghrelease

package
v0.74.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: AGPL-3.0 Imports: 4 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 ghrelease reads the published releases of a GitHub repository — the one piece lich's two update checks (the app in internal/appupdate and the lich plugin in internal/agentplugin) share. It reports release tags as bare versions and never errors: a failed lookup yields nothing, which every caller treats as "no release known" so a network blip never blocks or breaks startup.

Index

Constants

View Source
const BodyLimit = 1 << 20

BodyLimit caps a metadata response read; a releases/latest payload — or a release's checksums.txt — is a few KiB and a page of the releases list tens of KiB, so anything larger is malformed or hostile.

Variables

This section is empty.

Functions

func Get

func Get(client *http.Client, url string) (*http.Response, error)

Get issues a GET carrying lich's identifying headers. Every GitHub read lich makes goes through here so the request shape is stated once.

func LatestTag

func LatestTag(client *http.Client, url string) string

LatestTag GETs a GitHub releases/latest URL and returns its tag as a bare semver (leading "v" stripped), or "" on any failure.

func ReleaseTags

func ReleaseTags(client *http.Client, url string) []string

ReleaseTags GETs a GitHub releases list URL and returns the tags of its published releases as bare versions, newest first as GitHub lists them. Drafts and pre-releases are left out: neither is something lich installs. Any failure yields nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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