update

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package update checks whether a newer release of tickli is available and upgrades the binary in place by re-running `go install`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(stdout, stderr io.Writer) error

Run upgrades tickli in place by re-running `go install`.

func StartCheck

func StartCheck(current string) func(w io.Writer)

StartCheck launches an update check in the background and returns a function that prints a one-line notice to w when a newer version is available.

The check runs concurrently with the caller's work (which is typically blocked on network I/O of its own), so it adds no perceptible latency. The returned function waits at most printGrace for the check to finish.

Types

type VersionStatus added in v0.0.15

type VersionStatus int

VersionStatus reports how the running version compares to the latest release.

const (
	// StatusUnknown means the comparison could not be made: a dev build, the
	// check is disabled, or the latest version could not be determined.
	StatusUnknown VersionStatus = iota
	// StatusUpToDate means the running version is the latest release.
	StatusUpToDate
	// StatusOutdated means a newer release is available.
	StatusOutdated
)

func CheckVersion added in v0.0.15

func CheckVersion(current string) (status VersionStatus, latest string)

CheckVersion compares current against the latest published release. It reuses the on-disk cache the background notifier primes and only hits the network when that cache is missing or stale. latest holds the newest known version when status is StatusUpToDate or StatusOutdated.

Jump to

Keyboard shortcuts

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