exec

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 7 Imported by: 0 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

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	DryRun  bool
	Verbose bool
	// Out receives dry-run and verbose log lines; defaults to os.Stderr when nil.
	Out io.Writer
}

Runner executes external CLI commands, with optional dry-run and verbose modes.

func New

func New(dryRun, verbose bool) *Runner

New constructs a Runner.

func (*Runner) Run

func (r *Runner) Run(name string, args ...string) (string, string, error)

Run executes name with args, returning captured stdout and stderr.

func (*Runner) RunEnv

func (r *Runner) RunEnv(env []string, name string, args ...string) (string, string, error)

RunEnv executes name with args, appending env to the current process environment.

Jump to

Keyboard shortcuts

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