exec

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewCmd = func(name string, arg ...string) Executable {
	return &Cmd{cmd: exec.Command(name, arg...)}
}

Functions

This section is empty.

Types

type Cmd

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

func (Cmd) Run

func (c Cmd) Run() error

func (Cmd) SetDir

func (c Cmd) SetDir(dir string)

func (Cmd) SetEnv

func (c Cmd) SetEnv(env []string)

func (Cmd) SetStderr

func (c Cmd) SetStderr(stderr io.Writer)

func (Cmd) SetStdout

func (c Cmd) SetStdout(stdout io.Writer)

type Executable

type Executable interface {
	SetDir(dir string)
	SetStdout(stdout io.Writer)
	SetStderr(stderr io.Writer)
	SetEnv(env []string)
	Run() error
}

Jump to

Keyboard shortcuts

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