releases

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 15 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 releases retrieves and verifies official ZenNotes release binaries. It only stages candidates; the caller decides when to replace an installation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Newer

func Newer(candidate, current string) bool

func NormalizeVersion

func NormalizeVersion(version string) (string, error)

Types

type Asset

type Asset struct {
	Name   string `json:"name"`
	Size   int64  `json:"size"`
	Digest string `json:"digest"`
	URL    string `json:"browser_download_url"`
}

type Client

type Client struct {
	HTTP    *http.Client
	APIBase string
}

Client's base URL and HTTP client are injectable for offline integration tests. The CLI always uses NewClient; it does not accept an alternate release source.

func NewClient

func NewClient() *Client

func (*Client) Lookup

func (c *Client) Lookup(ctx context.Context, product Product, version string) (Release, error)

func (*Client) Stage

func (c *Client) Stage(ctx context.Context, product Product, release Release, goos, arch, dir string) (path string, err error)

Stage returns a verified executable in dir. The caller owns that file on success; every temporary file is removed on failure, including cancellation.

type Product

type Product string
const (
	CLI    Product = "ZenNotes/tui"
	Server Product = "ZenNotes/znserver"
)

type Release

type Release struct {
	Tag        string  `json:"tag_name"`
	URL        string  `json:"html_url"`
	Assets     []Asset `json:"assets"`
	Draft      bool    `json:"draft"`
	Prerelease bool    `json:"prerelease"`
}

func (Release) Version

func (r Release) Version() string

Jump to

Keyboard shortcuts

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