Versions in this module Expand all Collapse all v0 v0.4.0 Jan 3, 2024 Changes in this version + func AddToolchain(t Toolchain) + func AdvancedFetchFile(ctx context.Context, urls []string, localFile string) (err error) + func DetectFastestURL(ctx context.Context, urls []string) (fastest string, err error) + func FetchFile(ctx context.Context, url string, localFile string) (err error) + func FetchJSON(ctx context.Context, url string, v interface{}) (err error) + func FetchQueryHTML(ctx context.Context, url string, sel string, ...) (err error) + func FindBestVersion(c *semver.Constraints, versions semver.Collection) (idx int, version *semver.Version, err error) + func FindBestVersionedItem[T any](c *semver.Constraints, items []T, ...) (matched T, err error) + func InstallArchive(ctx context.Context, opts InstallArchiveOptions) (dir string, err error) + func TryFetch(ctx context.Context, url string) (delay time.Duration, err error) + type InstallArchiveOptions struct + DirectoryLevel int + DirectoryPath string + File string + Name string + ProvideURLs func() (urls []string, err error) + type Spec struct + Arch string + Name string + OS string + Version *semver.Version + VersionConstraints *semver.Constraints + VersionRaw string + func ParseSpec(s string) (spec Spec, err error) + func (s Spec) ConvertPlatform(remapOS, remapArch map[string]string) (os, arch string) + func (s Spec) VersionHasMinor() bool + func (s Spec) VersionHasPatch() bool + func (s Spec) VersionedName() string + type Toolchain interface + Activate func(ctx context.Context, spec Spec) (script string, err error) + Support func(spec Spec) bool + func FindToolchain(spec Spec) (Toolchain, bool)