Versions in this module Expand all Collapse all v1 v1.7.1 Oct 27, 2026 v1.7.0 Oct 27, 2026 v1.6.8 Oct 27, 2026 v1.6.7 Oct 22, 2026 v1.6.6 Oct 20, 2026 v1.6.5 Oct 18, 2026 v1.6.4 Oct 18, 2026 v1.6.4-rc.5 Oct 17, 2026 v1.6.4-rc.4 Oct 16, 2026 v1.6.4-rc.3 Oct 15, 2026 v1.6.4-rc.2 Oct 14, 2026 v1.6.4-rc.1 Oct 13, 2026 v1.6.3 Oct 11, 2026 v1.6.3-rc.1 Oct 11, 2026 v1.6.2 Oct 11, 2026 v1.6.2-rc.1 Oct 11, 2026 v1.6.1 Oct 10, 2026 Changes in this version + var ErrAssetNotFound = errors.New("asset not found") + var ErrCannotDecompressFile = errors.New("failed to decompress") + var ErrChecksumValidationFailed = errors.New("sha256 validation failed") + var ErrECDSAValidationFailed = errors.New("ECDSA signature verification failed") + var ErrExecutableNotFoundInArchive = errors.New("executable not found") + var ErrHashNotFound = errors.New("hash not found in checksum file") + var ErrIncorrectChecksumFile = errors.New("incorrect checksum file format") + var ErrIncorrectParameterOwner = errors.New("incorrect parameter \"owner\"") + var ErrIncorrectParameterRepo = errors.New("incorrect parameter \"repo\"") + var ErrInvalidECDSASignature = errors.New("invalid ECDSA signature") + var ErrInvalidID = errors.New("invalid repository ID, expected 'owner/name' but found number") + var ErrInvalidPGPSignature = errors.New("invalid PGP signature") + var ErrInvalidRelease = errors.New("invalid release (nil argument)") + var ErrInvalidSlug = errors.New("invalid slug format, expected 'owner/name'") + var ErrNotSupported = errors.New("operation not supported") + var ErrPGPKeyRingNotSet = errors.New("PGP key ring not set") + var ErrValidationAssetNotFound = errors.New("validation file not found") + var ErrValidatorNotFound = errors.New("file did not match a configured validator") + func DecompressCommand(src io.Reader, url, cmd, os, arch string) (io.Reader, error) + func ExecutablePath() (string, error) + func IsDarwinUniversalBinary(filename string) bool + func SetLogger(logger Logger) + func UpdateTo(ctx context.Context, assetURL, assetFileName, cmdPath string) error + type ChecksumValidator struct + UniqueFilename string + func (v *ChecksumValidator) GetValidationAssetName(releaseFilename string) string + func (v *ChecksumValidator) Validate(filename string, release, asset []byte) error + type Config struct + Arch string + Arm uint8 + Draft bool + Filters []string + OS string + OldSavePath string + Prerelease bool + Source Source + UniversalArch string + Validator Validator + type ECDSAValidator struct + PublicKey *ecdsa.PublicKey + func (v *ECDSAValidator) GetValidationAssetName(releaseFilename string) string + func (v *ECDSAValidator) Validate(filename string, input, signature []byte) error + func (v *ECDSAValidator) WithPublicKey(pemData []byte) *ECDSAValidator + type GitHubAsset struct + func NewGitHubAsset(from *github.ReleaseAsset) *GitHubAsset + func (a *GitHubAsset) GetBrowserDownloadURL() string + func (a *GitHubAsset) GetID() int64 + func (a *GitHubAsset) GetName() string + func (a *GitHubAsset) GetSize() int + type GitHubConfig struct + APIToken string + Context context.Context + EnterpriseBaseURL string + EnterpriseUploadURL string + type GitHubRelease struct + func NewGitHubRelease(from *github.RepositoryRelease) *GitHubRelease + func (r *GitHubRelease) GetAssets() []SourceAsset + func (r *GitHubRelease) GetDraft() bool + func (r *GitHubRelease) GetID() int64 + func (r *GitHubRelease) GetName() string + func (r *GitHubRelease) GetPrerelease() bool + func (r *GitHubRelease) GetPublishedAt() time.Time + func (r *GitHubRelease) GetReleaseNotes() string + func (r *GitHubRelease) GetTagName() string + func (r *GitHubRelease) GetURL() string + type GitHubSource struct + func NewGitHubSource(config GitHubConfig) (*GitHubSource, error) + func (s *GitHubSource) DownloadReleaseAsset(ctx context.Context, rel *Release, assetID int64) (io.ReadCloser, error) + func (s *GitHubSource) ListReleases(ctx context.Context, repository Repository) ([]SourceRelease, error) + type GitLabAsset struct + func NewGitLabAsset(from *gitlab.ReleaseLink) *GitLabAsset + func (a *GitLabAsset) GetBrowserDownloadURL() string + func (a *GitLabAsset) GetID() int64 + func (a *GitLabAsset) GetName() string + func (a *GitLabAsset) GetSize() int + type GitLabConfig struct + APIToken string + BaseURL string + type GitLabRelease struct + func NewGitLabRelease(from *gitlab.Release) *GitLabRelease + func (r *GitLabRelease) GetAssets() []SourceAsset + func (r *GitLabRelease) GetDraft() bool + func (r *GitLabRelease) GetID() int64 + func (r *GitLabRelease) GetName() string + func (r *GitLabRelease) GetPrerelease() bool + func (r *GitLabRelease) GetPublishedAt() time.Time + func (r *GitLabRelease) GetReleaseNotes() string + func (r *GitLabRelease) GetTagName() string + func (r *GitLabRelease) GetURL() string + type GitLabSource struct + func NewGitLabSource(config GitLabConfig) (*GitLabSource, error) + func (s *GitLabSource) DownloadReleaseAsset(ctx context.Context, rel *Release, assetID int64) (io.ReadCloser, error) + func (s *GitLabSource) ListReleases(ctx context.Context, repository Repository) ([]SourceRelease, error) + type GiteaAsset struct + func NewGiteaAsset(from *gitea.Attachment) *GiteaAsset + func (a *GiteaAsset) GetBrowserDownloadURL() string + func (a *GiteaAsset) GetID() int64 + func (a *GiteaAsset) GetName() string + func (a *GiteaAsset) GetSize() int + type GiteaConfig struct + APIToken string + BaseURL string + Context context.Context + type GiteaRelease struct + func NewGiteaRelease(from *gitea.Release) *GiteaRelease + func (r *GiteaRelease) GetAssets() []SourceAsset + func (r *GiteaRelease) GetDraft() bool + func (r *GiteaRelease) GetID() int64 + func (r *GiteaRelease) GetName() string + func (r *GiteaRelease) GetPrerelease() bool + func (r *GiteaRelease) GetPublishedAt() time.Time + func (r *GiteaRelease) GetReleaseNotes() string + func (r *GiteaRelease) GetTagName() string + func (r *GiteaRelease) GetURL() string + type GiteaSource struct + func NewGiteaSource(config GiteaConfig) (*GiteaSource, error) + func (s *GiteaSource) DownloadReleaseAsset(ctx context.Context, rel *Release, assetID int64) (io.ReadCloser, error) + func (s *GiteaSource) ListReleases(ctx context.Context, repository Repository) ([]SourceRelease, error) + type HttpAsset struct + ID int64 + Name string + Size int + URL string + func (a *HttpAsset) GetBrowserDownloadURL() string + func (a *HttpAsset) GetID() int64 + func (a *HttpAsset) GetName() string + func (a *HttpAsset) GetSize() int + type HttpConfig struct + BaseURL string + Headers http.Header + Transport *http.Transport + type HttpManifest struct + LastAssetID int64 + LastReleaseID int64 + Releases []*HttpRelease + type HttpRelease struct + Assets []*HttpAsset + Draft bool + ID int64 + Name string + Prerelease bool + PublishedAt time.Time + ReleaseNotes string + TagName string + URL string + func (r *HttpRelease) GetAssets() []SourceAsset + func (r *HttpRelease) GetDraft() bool + func (r *HttpRelease) GetID() int64 + func (r *HttpRelease) GetName() string + func (r *HttpRelease) GetPrerelease() bool + func (r *HttpRelease) GetPublishedAt() time.Time + func (r *HttpRelease) GetReleaseNotes() string + func (r *HttpRelease) GetTagName() string + func (r *HttpRelease) GetURL() string + type HttpSource struct + func NewHttpSource(config HttpConfig) (*HttpSource, error) + func (s *HttpSource) DownloadReleaseAsset(ctx context.Context, rel *Release, assetID int64) (io.ReadCloser, error) + func (s *HttpSource) ListReleases(ctx context.Context, repository Repository) ([]SourceRelease, error) + type Logger interface + Print func(v ...any) + Printf func(format string, v ...any) + type PGPValidator struct + Binary bool + KeyRing openpgp.EntityList + func (g *PGPValidator) GetValidationAssetName(releaseFilename string) string + func (g *PGPValidator) Validate(filename string, release, signature []byte) (err error) + func (g *PGPValidator) WithArmoredKeyRing(key []byte) *PGPValidator + type PatternValidator struct + func (m *PatternValidator) Add(glob string, validator Validator) *PatternValidator + func (m *PatternValidator) GetValidationAssetName(releaseFilename string) string + func (m *PatternValidator) MustContinueValidation(filename string) bool + func (m *PatternValidator) SkipValidation(glob string) *PatternValidator + func (m *PatternValidator) Validate(filename string, release, asset []byte) error + type RecursiveValidator interface + MustContinueValidation func(filename string) bool + type Release struct + Arch string + Arm uint8 + AssetByteSize int + AssetID int64 + AssetName string + AssetURL string + Name string + OS string + Prerelease bool + PublishedAt time.Time + ReleaseID int64 + ReleaseNotes string + URL string + ValidationAssetID int64 + ValidationAssetURL string + ValidationChain []struct{ ... } + func DetectLatest(ctx context.Context, repository Repository) (*Release, bool, error) + func DetectVersion(ctx context.Context, repository Repository, version string) (*Release, bool, error) + func UpdateCommand(ctx context.Context, cmdPath string, current string, repository Repository) (*Release, error) + func UpdateSelf(ctx context.Context, current string, repository Repository) (*Release, error) + func (r Release) Equal(other string) bool + func (r Release) GreaterOrEqual(other string) bool + func (r Release) GreaterThan(other string) bool + func (r Release) LessOrEqual(other string) bool + func (r Release) LessThan(other string) bool + func (r Release) Version() string + type Repository interface + Get func() (any, error) + GetSlug func() (string, string, error) + type RepositoryID int + func NewRepositoryID(id int) RepositoryID + func (r RepositoryID) Get() (any, error) + func (r RepositoryID) GetSlug() (string, string, error) + type RepositorySlug struct + func NewRepositorySlug(owner, repo string) RepositorySlug + func ParseSlug(slug string) RepositorySlug + func (r RepositorySlug) Get() (any, error) + func (r RepositorySlug) GetSlug() (string, string, error) + type SHAValidator struct + func (v *SHAValidator) GetValidationAssetName(releaseFilename string) string + func (v *SHAValidator) Validate(filename string, release, asset []byte) error + type Source interface + DownloadReleaseAsset func(ctx context.Context, rel *Release, assetID int64) (io.ReadCloser, error) + ListReleases func(ctx context.Context, repository Repository) ([]SourceRelease, error) + type SourceAsset interface + GetBrowserDownloadURL func() string + GetID func() int64 + GetName func() string + GetSize func() int + type SourceRelease interface + GetAssets func() []SourceAsset + GetDraft func() bool + GetID func() int64 + GetName func() string + GetPrerelease func() bool + GetPublishedAt func() time.Time + GetReleaseNotes func() string + GetTagName func() string + GetURL func() string + type Updater struct + func DefaultUpdater() *Updater + func NewUpdater(config Config) (*Updater, error) + func (up *Updater) DetectLatest(ctx context.Context, repository Repository) (release *Release, found bool, err error) + func (up *Updater) DetectVersion(ctx context.Context, repository Repository, version string) (release *Release, found bool, err error) + func (up *Updater) UpdateCommand(ctx context.Context, cmdPath string, current string, repository Repository) (*Release, error) + func (up *Updater) UpdateSelf(ctx context.Context, current string, repository Repository) (*Release, error) + func (up *Updater) UpdateTo(ctx context.Context, rel *Release, cmdPath string) error + type Validator interface + GetValidationAssetName func(releaseFilename string) string + Validate func(filename string, release, asset []byte) error + func NewChecksumWithECDSAValidator(checksumsFilename string, pemECDSACertificate []byte) Validator + func NewChecksumWithPGPValidator(checksumsFilename string, armoredPGPKeyRing []byte) Validator