toolchain

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveName

func ArchiveName(version string, platform Platform) string

func Command

func Command(paths Paths, args ...string) *exec.Cmd

func Download

func Download(url string, destination string) error

func DownloadURL

func DownloadURL(version string, platform Platform) string

func ExtractTarGz

func ExtractTarGz(archivePath string, destinationDir string) error

func ExtractTarXz

func ExtractTarXz(archivePath string, destinationDir string) error

func ExtractZip

func ExtractZip(archivePath, destinationDir string) error

ExtractZip extracts the Windows Go distribution without invoking a shell.

func PNPMCommand

func PNPMCommand(node NodePaths, pnpm PNPMPaths, workDir string, args ...string) *exec.Cmd

func PluginBuildArgs added in v0.1.2

func PluginBuildArgs(args []string) []string

PluginBuildArgs matches the host's path normalization so plugins built on another machine retain compatible package fingerprints.

func ResolveGoxHome

func ResolveGoxHome() (string, error)

func ToModVersion

func ToModVersion(exactVersion string) string

Types

type Info

type Info struct {
	ExactVersion string
	ModVersion   string
}

func New

func New(exactVersion string) Info

type NodeInfo

type NodeInfo struct{ ExactVersion string }

func NewNode

func NewNode(version string) NodeInfo

type NodePaths

type NodePaths struct {
	HomeDir      string
	ToolchainDir string
	VersionDir   string
	NodeRoot     string
	NodeBin      string
	NodeExec     string
	NPMExec      string
	NPXExec      string
	CorepackExec string
	ArchivePath  string
}

func EnsureNode

func EnsureNode(info NodeInfo) (NodePaths, error)

func ResolveNodePaths

func ResolveNodePaths(info NodeInfo, platform Platform) (NodePaths, error)

type PNPMInfo

type PNPMInfo struct{ ExactVersion string }

func NewPNPM

func NewPNPM(version string) PNPMInfo

type PNPMPaths

type PNPMPaths struct {
	HomeDir      string
	ToolchainDir string
	VersionDir   string
	PNPMRoot     string
	PNPMBin      string
	PNPMExec     string
}

func EnsurePNPM

func EnsurePNPM(info PNPMInfo, node NodePaths) (PNPMPaths, error)

func ResolvePNPMPaths

func ResolvePNPMPaths(info PNPMInfo) (PNPMPaths, error)

type Paths

type Paths struct {
	HomeDir      string
	ToolchainDir string
	VersionDir   string
	GoRoot       string
	GoBin        string
	GoExec       string
	GofmtExec    string
	ArchivePath  string
}

func Ensure

func Ensure(info Info) (Paths, error)

func ResolvePaths

func ResolvePaths(info Info, platform Platform) (Paths, error)

type Platform

type Platform struct {
	OS   string
	Arch string
	Ext  string
}

func CurrentPlatform

func CurrentPlatform() (Platform, error)

Jump to

Keyboard shortcuts

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