update

package
v0.0.0-...-1568974 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) error

func DownloadBinary

func DownloadBinary(url, filename string) error

func FindBinaryForCurrentPlatform

func FindBinaryForCurrentPlatform(release *GitHubRelease) (string, error)

func PromptYesNo

func PromptYesNo(prompt string) (bool, error)

func Update

func Update(skipPrompt bool, interactive bool) (bool, error)

Types

type GitHubRelease

type GitHubRelease struct {
	TagName string `json:"tag_name"`
	Assets  []struct {
		BrowserDownloadURL string `json:"browser_download_url"`
		Name               string `json:"name"`
	} `json:"assets"`
}

func GetLatestRelease

func GetLatestRelease() (*GitHubRelease, error)

func GetReleases

func GetReleases() ([]GitHubRelease, error)

func SelectReleaseInteractively

func SelectReleaseInteractively(releases []GitHubRelease) (*GitHubRelease, error)

func (*GitHubRelease) IsNewer

func (r *GitHubRelease) IsNewer() (bool, error)

type ProgressReader

type ProgressReader struct {
	Reader       io.Reader
	TotalSize    int
	CurrentBytes int
	Spinner      *spinner.Spinner
}

func (*ProgressReader) Read

func (pr *ProgressReader) Read(p []byte) (int, error)

Jump to

Keyboard shortcuts

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