selfupdate

package
v3.47.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveName

func ArchiveName(version, targetOS, targetArch string) string

func BinaryName

func BinaryName(targetOS string) string

func BuildChecksumURL

func BuildChecksumURL(version string) string

func BuildDownloadURL

func BuildDownloadURL(version, targetOS, targetArch string) string

func DownloadToTemp

func DownloadToTemp(url string) (string, error)

func ExtractBinary

func ExtractBinary(archivePath, dest, targetOS string) error

func FetchExpectedSHA256

func FetchExpectedSHA256(sumsURL, archiveFilename string) (string, error)

func ReplaceBinary

func ReplaceBinary(archivePath, targetPath, targetOS string) error

func UpdateInstruction

func UpdateInstruction(installation Installation) string

func VerifySHA256

func VerifySHA256(path, expected string) error

Types

type InstallMethod

type InstallMethod string
const (
	InstallMethodStandalone InstallMethod = "standalone"
	InstallMethodHomebrew   InstallMethod = "homebrew"
	InstallMethodMise       InstallMethod = "mise"
)

type Installation

type Installation struct {
	Path         string
	ResolvedPath string
	Method       InstallMethod
	BrewFormula  string
}

func CurrentInstallation

func CurrentInstallation() (Installation, error)

func DetectInstallation

func DetectInstallation(path, resolvedPath string) Installation

func (Installation) TargetPath

func (i Installation) TargetPath() string

Jump to

Keyboard shortcuts

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