Versions in this module Expand all Collapse all v1 v1.5.4 May 1, 2026 Changes in this version type Service + ForgeGetterFactory func(opts Options) forge.HTTPGetter type TargetKind + const TargetForge v1.5.3 Apr 29, 2026 Changes in this version type Options + SourcePath string type Service + SourceForgeGetterFactory func(opts Options) sourcesf.HTTPGetter type TargetKind + const TargetSourceForge v1.5.2 Apr 29, 2026 Changes in this version + const InstallModeInstaller + const InstallModePortable + func ClientOptions(opts Options) client.Options + func DetectGUIInstallMode(isGUI bool, fileName string) string + type ConfirmFunc func(file string) (bool, error) + type DefaultInstallerLauncher struct + GOOS string + func (l DefaultInstallerLauncher) LaunchInstaller(path string, kind InstallerKind) error type InstallRunner + ConfirmLaunchInstaller ConfirmFunc + InstallerLauncher InstallerLauncher + type InstallerKind string + const InstallerKindEXE + const InstallerKindMSI + const InstallerKindUnknown + func DetectInstallerKind(fileName string) InstallerKind + type InstallerLauncher interface + LaunchInstaller func(path string, kind InstallerKind) error type Options + GuiTarget string + InstallMode string + IsGUI bool + OutputExplicit bool type RunResult + InstallMode string + InstallerFile string + IsGUI bool v1.5.1 Apr 22, 2026 Changes in this version + func APICacheFilePath(cacheDir, rawURL string) string type Archive + func NewSevenZipArchive(data []byte, d DecompFn) (Archive, error) type Chooser + func NewFileChooser(expr string) (Chooser, error) + type MultiChooser struct + func (m *MultiChooser) Choose(name string, dir bool, mode fs.FileMode) (bool, bool) + func (m *MultiChooser) String() string type Options + APICacheDir string + APICacheEnabled bool + APICacheTime int + GhproxyEnabled bool + GhproxyFallbacks []string + GhproxyHostURL string + GhproxySupportAPI bool + type SevenZipArchive struct + func (z *SevenZipArchive) Next() (File, error) + func (z *SevenZipArchive) ReadAll() ([]byte, error) v1.5.0 Apr 21, 2026 Changes in this version + var ErrNoToken = errors.New("no github token") + func CacheFilePath(cacheDir, url string) string + func Cast[T any](value any) (T, error) + func Download(url string, out io.Writer, getbar func(size int64) *pb.ProgressBar, ...) error + func Get(url string, disableSSL bool) (*http.Response, error) + func GetWithOptions(url string, opts Options) (*http.Response, error) + func IsGitHubURL(s string) bool + func IsLocalFile(s string) bool + func IsURL(s string) bool + func NormalizeRepoTarget(target string) (string, error) + func SelectExtractorAs[T any](s *Service, url, tool string, opts *Options) (T, error) + func SetVerbose(enabled bool, writer io.Writer) + func VerboseEnabledForTest() bool + type Archive interface + Next func() (File, error) + ReadAll func() ([]byte, error) + func NewTarArchive(data []byte, decompress DecompFn) (Archive, error) + func NewZipArchive(data []byte, d DecompFn) (Archive, error) + type ArchiveExtractor struct + Ar ArchiveFn + Decompress DecompFn + File Chooser + func NewArchiveExtractor(file Chooser, ar ArchiveFn, decompress DecompFn) *ArchiveExtractor + func (a *ArchiveExtractor) Extract(data []byte, multiple bool) (ExtractedFile, []ExtractedFile, error) + type ArchiveFn func(data []byte, decomp DecompFn) (Archive, error) + type BinaryChooser struct + Tool string + func NewBinaryChooser(tool string) *BinaryChooser + func (b *BinaryChooser) Choose(name string, dir bool, mode fs.FileMode) (bool, bool) + func (b *BinaryChooser) String() string + type Chooser interface + Choose func(name string, dir bool, mode fs.FileMode) (direct bool, possible bool) + type DecompFn func(r io.Reader) (io.Reader, error) + type Detector interface + Detect func(assets []string) (string, []string, error) + type DirectAssetFinder struct + URL string + func (f *DirectAssetFinder) Find() ([]string, error) + type ExtractedFile struct + ArchiveName string + Dir bool + Extract func(to string) error + Name string + func (e ExtractedFile) Mode() fs.FileMode + func (e ExtractedFile) String() string + type Extractor interface + Extract func(data []byte, multiple bool) (ExtractedFile, []ExtractedFile, error) + func NewExtractor(filename string, tool string, chooser Chooser) Extractor + type File struct + LinkName string + Mode fs.FileMode + Name string + Type FileType + func (f File) Dir() bool + type FileType byte + const TypeDir + const TypeLink + const TypeNormal + const TypeOther + const TypeSymlink + type Finder interface + Find func() ([]string, error) + type GlobChooser struct + func NewGlobChooser(gl string) (*GlobChooser, error) + func (g *GlobChooser) Choose(name string, dir bool, mode fs.FileMode) (bool, bool) + func (g *GlobChooser) String() string + type HTTPGetterFunc func(url string) (*http.Response, error) + func NewHTTPGetter(opts Options) HTTPGetterFunc + func (f HTTPGetterFunc) Get(url string) (*http.Response, error) + type InstallRunner struct + InstalledLoad func() (map[string]string, map[string]string, error) + Prompt PromptFunc + Service *Service + Stderr io.Writer + Stdout io.Writer + func NewRunner(service *Service) *InstallRunner + func (r *InstallRunner) Run(target string, opts Options) (RunResult, error) + type LiteralFileChooser struct + File string + func (l *LiteralFileChooser) Choose(name string, dir bool, mode fs.FileMode) (bool, bool) + func (l *LiteralFileChooser) String() string + type Options struct + All bool + Asset []string + CacheDir string + DisableSSL bool + DownloadOnly bool + ExtractFile string + Hash bool + Name string + Output string + Prerelease bool + ProxyURL string + Quiet bool + Source bool + System string + Tag string + UpgradeOnly bool + Verbose bool + Verify string + type PromptFunc func(choices []string) (int, error) + type RateLimit struct + Limit int + Remaining int + Reset int64 + func GetRateLimit(opts Options) (RateLimit, error) + func (r RateLimit) ResetTime() time.Time + type RateLimitJSON struct + Resources map[string]RateLimit + type RunResult struct + Asset string + ExtractedFiles []string + Tool string + URL string + type Runner interface + Run func(target string, opts Options) (RunResult, error) + type Service struct + AllDetectorFactory func() Detector + AssetDetectorFactory func(asset string, anti bool) Detector + BinaryChooserFactory func(tool string) any + BinaryModTime func(tool, output string) time.Time + DetectorChainFactory func(detectors []Detector, system Detector) Detector + DownloadOnlyExtractorFactory func(name string) any + ExtractorFactory func(filename, tool string, chooser any) any + GitHubGetter sourcegithub.HTTPGetter + GitHubGetterFactory func(opts Options) sourcegithub.HTTPGetter + GlobChooserFactory func(pattern string) (any, error) + NoVerifierFactory func() Verifier + Sha256AssetVerifierFactory func(assetURL string, opts Options) Verifier + Sha256PrinterFactory func() Verifier + Sha256VerifierFactory func(expected string) (Verifier, error) + SystemDetectorFactory func(goos, goarch string) (Detector, error) + func NewDefaultService(githubGetter sourcegithub.HTTPGetter, ...) *Service + func NewService() *Service + func (s *Service) SelectDetector(opts *Options) (Detector, error) + func (s *Service) SelectExtractor(url, tool string, opts *Options) (any, error) + func (s *Service) SelectFinder(target string, opts *Options) (Finder, string, error) + func (s *Service) SelectVerifier(sumAsset string, opts *Options) (Verifier, error) + type SingleFileExtractor struct + Decompress func(r io.Reader) (io.Reader, error) + Name string + Rename string + func NewDownloadOnlyExtractor(name string) *SingleFileExtractor + func (s *SingleFileExtractor) Extract(data []byte, multiple bool) (ExtractedFile, []ExtractedFile, error) + type TarArchive struct + func (t *TarArchive) Next() (File, error) + func (t *TarArchive) ReadAll() ([]byte, error) + type TargetKind string + const TargetDirectURL + const TargetGitHubURL + const TargetLocalFile + const TargetRepo + const TargetUnknown + func DetectTargetKind(target string) TargetKind + type Verifier interface + Verify func(b []byte) error + type ZipArchive struct + func (z *ZipArchive) Next() (File, error) + func (z *ZipArchive) ReadAll() ([]byte, error)