update

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package update checks GitHub releases for newer CLI versions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Current string
	Latest  string
}

Result holds version info when an update is available.

func Check

func Check(ctx context.Context, currentVersion string, baseURL string) (*Result, error)

Check queries GitHub for the latest release and compares it to currentVersion. Returns a non-nil Result if a newer version is available, nil if up-to-date. baseURL overrides the GitHub API base URL (for testing); pass "" for default.

Jump to

Keyboard shortcuts

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