versioncheck

package
v0.2.27 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChecksumURL added in v0.2.14

func ChecksumURL(version string) string

ChecksumURL returns the checksums.txt URL for a given version.

func DownloadURL added in v0.2.14

func DownloadURL(version, goos, goarch string) string

DownloadURL returns the archive download URL for a given version/os/arch.

func IsNewer

func IsNewer(local, remote string) bool

IsNewer reports whether remote is a different (presumably newer) version than local. For "dev" builds, always returns true.

func Update added in v0.2.14

func Update(ctx context.Context, version string, destPath string) error

Update downloads the given release version, verifies its checksum, and atomically replaces the running binary. destPath is the path to replace (usually the result of os.Executable()).

Types

type ReleaseInfo

type ReleaseInfo struct {
	TagName string `json:"tag_name"`
	HTMLURL string `json:"html_url"`
}

ReleaseInfo holds metadata about a GitHub release.

func Latest

func Latest(ctx context.Context) (*ReleaseInfo, error)

Latest queries the GitHub releases API for the latest release.

Jump to

Keyboard shortcuts

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