selfupgrade

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubUpdater

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

GithubUpdater checks for and applies CLI updates from GitHub releases.

func NewGitHubUpdater

func NewGitHubUpdater() (*GithubUpdater, error)

NewGitHubUpdater creates a GithubUpdater.

func (*GithubUpdater) DetectLatest

func (g *GithubUpdater) DetectLatest(ctx context.Context) (*ReleaseInfo, bool, error)

DetectLatest finds the latest release available.

func (*GithubUpdater) DetectVersion

func (g *GithubUpdater) DetectVersion(ctx context.Context, version string) (*ReleaseInfo, bool, error)

DetectVersion finds a specific release by version string.

func (*GithubUpdater) UpdateTo

func (g *GithubUpdater) UpdateTo(ctx context.Context, version string, execPath string) error

UpdateTo downloads and replaces the binary at execPath with the given version.

type ReleaseInfo

type ReleaseInfo struct {
	Version string
}

ReleaseInfo contains version information about a release.

Jump to

Keyboard shortcuts

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