updatecheck

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	// contains filtered or unexported fields
}

func New

func New(currentVersion string, logger *slog.Logger) *Checker

func (*Checker) CheckForUpdateAsync added in v0.3.1

func (c *Checker) CheckForUpdateAsync(ctx context.Context) <-chan string

CheckForUpdateAsync starts an asynchronous update check and returns a channel that will receive the update message. The channel is buffered and will be closed after writing the result (or empty string if no update).

func (*Checker) CheckForUpdateMessage added in v0.3.1

func (c *Checker) CheckForUpdateMessage(ctx context.Context) string

CheckForUpdateMessage checks if a new version is available and returns a formatted message. Returns empty string if no update is available or if check should be skipped.

type GitHubRelease

type GitHubRelease struct {
	TagName string `json:"tag_name"`
	HTMLURL string `json:"html_url"`
	Name    string `json:"name"`
	Version string `json:"-"`
}

Jump to

Keyboard shortcuts

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