Versions in this module Expand all Collapse all v0 v0.1.1 Jul 23, 2026 Changes in this version + const DefaultReleasesURL + const DefaultUserAgent + const HomebrewUpgradeCommand + var ErrUnsupportedPlatform = errors.New("unsupported update platform") + func InstallVerified(layout Layout, verified VerifiedUpdate) error + func IsHomebrew(err error) bool + func ParseChecksums(data []byte, expected string) ([]byte, error) + func ValidateArchive(data []byte, expectedExecutable string, maxSize uint64) ([]byte, error) + type Asset struct + Name string + URL string + type CheckResult struct + CurrentValid bool + CurrentVersion string + LatestVersion string + PlatformSupported bool + Release Release + UpdateAvailable bool + type CheckState struct + LastCompleted time.Time + LatestVersion string + type Client struct + ArchiveMax int64 + ChecksumMax int64 + ExecutableMax uint64 + GOARCH string + GOOS string + HTTP *http.Client + ReleaseMax int64 + ReleasesURL string + UserAgent string + func NewClient(httpClient *http.Client) *Client + func (c *Client) Check(ctx context.Context, current string) (CheckResult, error) + func (c *Client) DownloadVerified(ctx context.Context, release Release) (VerifiedUpdate, error) + type HomebrewError struct + Path string + func (e *HomebrewError) Error() string + type Layout struct + Invoked string + Kind LayoutKind + Mode os.FileMode + Path string + Platform Platform + func InspectExecutable(executablePath, goos, goarch string) (Layout, error) + func InspectRunningExecutable() (Layout, error) + type LayoutKind int + const LayoutHomebrew + const LayoutManual + type Platform struct + Archive string + Executable string + GOARCH string + GOOS string + func PlatformFor(goos, goarch string) (Platform, error) + type Release struct + Archive Asset + Checksums Asset + Platform Platform + Tag string + Version Version + type StateStore struct + Now func() time.Time + Path string + func (s StateStore) Due(interval time.Duration) bool + func (s StateStore) Load() (CheckState, error) + func (s StateStore) MarkCompleted(latest string) (retErr error) + type VerifiedUpdate struct + Data []byte + ExecutableName string + Platform Platform + Version string + type Version struct + Major int + Minor int + Patch int + func ParseVersion(value string) (Version, error) + func (v Version) String() string