install

package
v1.3.53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetURL

func AssetURL(version string, target Target) string

func ChecksumsURL

func ChecksumsURL(version string) string

func NormalizeVersion

func NormalizeVersion(version string) string

func ReleaseBaseURL

func ReleaseBaseURL(version string) string

func ResolveInstallDir

func ResolveInstallDir(explicit string) (string, error)

func ResolveReleaseVersion added in v1.0.17

func ResolveReleaseVersion(ctx context.Context, client *http.Client, version string) (string, error)

func WriteExecutable added in v1.0.17

func WriteExecutable(path string, data []byte) error

Types

type BinaryResult added in v1.0.17

type BinaryResult struct {
	Version    string
	Target     Target
	BinaryData []byte
	ArchiveURL string
}

func DownloadBinary added in v1.0.17

func DownloadBinary(ctx context.Context, opts Options) (BinaryResult, error)

type Options

type Options struct {
	Version string
	Dir     string

	PlatformGOOS   string
	PlatformGOARCH string
	HTTPClient     *http.Client
	BaseURL        string
}

type Result

type Result struct {
	Path       string
	Version    string
	ArchiveURL string
}

func Install

func Install(ctx context.Context, opts Options) (Result, error)

type Target

type Target struct {
	GOOS        string
	GOARCH      string
	ArchiveName string
	BinaryName  string
}

func DetectTarget

func DetectTarget(goos, goarch string) (Target, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL