tool

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is the error resulting if a path search failed to find
	// an executable file.
	ErrNotFound = exec.ErrNotFound
)

Functions

This section is empty.

Types

type Tool

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

Tool represents a tool that can be executed.

func New

func New(cmd string, installs []string) *Tool

New creates a new Tool instance with the specified cmd and its install commands.

func (*Tool) Get

func (p *Tool) Get(quietInstall bool) (app string, err error)

Get retrieves the path of the command. If the command is not found, it attempts to install it using the specified install commands.

func (*Tool) New

func (p *Tool) New(quietInstall bool, args ...string) (cmd *exec.Cmd, err error)

New creates a new command with the specified arguments.

Jump to

Keyboard shortcuts

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