executor

package
v0.106.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 3 Imported by: 4

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