selfupgrade

package
v0.5.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

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