update

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package update implements a best-effort "a newer version is available" notice for the a-novel CLI. It is deliberately non-fatal: every failure (offline, proxy down, unparseable data, unwritable cache) is swallowed, because a version check must never disrupt or slow a command. The latest version is cached so the network is hit at most once per checkInterval, not on every invocation; in between, the cached value drives the notice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Notify

func Notify(w io.Writer, current string)

Notify writes a short "update available" suggestion to w — two lines: the available version, then the install command — when a tagged release newer than current exists. current is version.String(): a non-release value (a commit hash, "dev", "(devel)") is skipped, since there is nothing to compare a local build against. Honors the A_NOVEL_NO_UPDATE_CHECK opt-out. All errors are intentionally ignored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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