Help us shape the future of Go! Take the 2026 Go Developer Survey

tool

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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