Documentation
¶
Overview ¶
Package downloader provides platform-independent binary download from GitHub Releases. It detects the current platform, downloads the correct archive, verifies SHA-256 checksums, and installs the binary atomically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupportedPlatform = errors.New("unsupported platform")
ErrUnsupportedPlatform is returned when the current platform is not supported.
Functions ¶
func DefaultDestSubdir ¶
func DefaultDestSubdir() string
DefaultDestSubdir returns the default subdirectory under home for the binary.
func IsVersionNotFoundErr ¶
IsVersionNotFoundErr checks if an error indicates the release version was not found (404).
func SupportedPlatforms ¶
func SupportedPlatforms() []string
SupportedPlatforms returns a list of supported platform strings for error messages.
Types ¶
type DownloadResult ¶
DownloadResult holds the outcome of a binary download operation.
func DownloadBinary ¶
func DownloadBinary(version, destDir string) (*DownloadResult, error)
DownloadBinary downloads and installs the aether binary for the current platform.
Parameters:
- version: semver string (e.g. "1.0.0"), without "v" prefix
- destDir: directory to install the binary into (e.g. "~/.aether/bin")
Returns a DownloadResult with success status and installed path.
type HashResult ¶
HashResult holds the computed SHA-256 hash and path of a downloaded file.