tool

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *cli.Command

New returns the fully-wired "tool" CLI command tree.

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

Cmd provides the action logic for tool subcommands.

func (*Cmd) CacheDir

func (c *Cmd) CacheDir(source, tool, version, arch string) (string, error)

CacheDir caches a directory as a tool in the runner tool cache.

func (*Cmd) CacheFile

func (c *Cmd) CacheFile(source, targetName, tool, version, arch string) (string, error)

CacheFile caches a file as a tool in the runner tool cache.

func (*Cmd) CacheFind

func (c *Cmd) CacheFind(tool, arch, versionSpec string) (string, error)

CacheFind returns the path to a cached tool matching the version spec.

func (*Cmd) CacheFindAll

func (c *Cmd) CacheFindAll(tool, arch string) ([]string, error)

CacheFindAll returns all cached paths for a tool.

func (*Cmd) CacheGet

func (c *Cmd) CacheGet() (string, error)

CacheGet returns the tool cache directory path.

func (*Cmd) Download

func (c *Cmd) Download(ctx context.Context, rawURL string) (string, error)

Download downloads a tool from a URL to a temporary directory.

func (*Cmd) ExtractTar

func (c *Cmd) ExtractTar(path string, gz bool) (string, error)

ExtractTar extracts a tar archive to a temporary directory.

func (*Cmd) ExtractZip

func (c *Cmd) ExtractZip(path string) (string, error)

ExtractZip extracts a zip archive to a temporary directory.

func (*Cmd) Install added in v0.0.2

func (c *Cmd) Install(ctx context.Context, options InstallOptions) (string, error)

Install resolves, downloads, and caches a tool release. It returns the cached tool path.

func (*Cmd) VersionCheck

func (c *Cmd) VersionCheck(version, versionSpec string) (bool, error)

VersionCheck checks if a version satisfies a version spec.

type InstallOptions added in v0.0.2

type InstallOptions struct {
	Name              string
	Owner             string
	Repo              string
	Version           string
	Arch              string
	OS                string
	IncludePreRelease bool
	Token             string
}

InstallOptions is the set of options used to install a tool.

Jump to

Keyboard shortcuts

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