runner

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MPL-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIRunner

type CLIRunner struct{}

CLIRunner will use exec.Command as runtime medium.

func (*CLIRunner) Run

func (*CLIRunner) Run(c string, args ...string) ([]byte, error)

Run will use exec.Command as a backing medium and run CombinedOutput.

func (*CLIRunner) RunWithOutputStream

func (*CLIRunner) RunWithOutputStream(c string, args ...string) ([]byte, error)

Run will use exec.Command as a backing medium and run CombinedOutput.

func (*CLIRunner) RunWithStdin

func (*CLIRunner) RunWithStdin(c string, args []string, stdinData []byte) ([]byte, error)

type Runner

type Runner interface {
	// Run takes a command name and some arguments and will apply it to the current environment.
	Run(command string, args ...string) ([]byte, error)
	// RunWithStream takes a command name and some argument and outputs the command in realtime to stdout
	RunWithOutputStream(command string, args ...string) ([]byte, error)
	// RunWithStdin take a command name, arguments and passes stdin data to the command
	RunWithStdin(command string, args []string, stdinData []byte) ([]byte, error)
}

Runner is an entity which can execute commands with whatever backing medium behind it.

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