executor

package
v0.146.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 3 modules, 4 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 EnvVars

type EnvVars map[string]string

type Executor

type Executor interface {
	Exec(command string, args ...string) error
	ExecWithOut(command string, args ...string) ([]byte, error)
	ExecInDir(command string, dir string, args ...string) error
}

Executor executes commands shelling out and binding the stdout and stderr to the os ones

func NewShellExecutor

func NewShellExecutor(envVars EnvVars) Executor

NewShellExecutor creates a new executor that runs commands

type ShellExecutor

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

ShellExecutor an executor that shells out to run commands

func (ShellExecutor) Exec

func (e ShellExecutor) Exec(command string, args ...string) error

Exec execute the command with the specified args

func (ShellExecutor) ExecInDir

func (e ShellExecutor) ExecInDir(command string, dir string, args ...string) error

ExecInDir executes the command inside the directory with the specified args

func (ShellExecutor) ExecWithOut added in v0.53.0

func (e ShellExecutor) ExecWithOut(command string, args ...string) ([]byte, error)

ExecWithOut executes the command with the specified args and returns the output

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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