Documentation
¶
Index ¶
- func ArchiveName(version, targetOS, targetArch string) string
- func BinaryName(targetOS string) string
- func BuildChecksumURL(version string) string
- func BuildDownloadURL(version, targetOS, targetArch string) string
- func DownloadToTemp(url string) (string, error)
- func ExtractBinary(archivePath, dest, targetOS string) error
- func FetchExpectedSHA256(sumsURL, archiveFilename string) (string, error)
- func ReplaceBinary(archivePath, targetPath, targetOS string) error
- func UpdateInstruction(installation Installation) string
- func VerifySHA256(path, expected string) error
- type InstallMethod
- type Installation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveName ¶
func BinaryName ¶
func BuildChecksumURL ¶
func BuildDownloadURL ¶
func DownloadToTemp ¶
func ExtractBinary ¶
func FetchExpectedSHA256 ¶
func ReplaceBinary ¶
func UpdateInstruction ¶
func UpdateInstruction(installation Installation) string
func VerifySHA256 ¶
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
Click to show internal directories.
Click to hide internal directories.