executor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture added in v0.0.2

func Capture(program string, args ...string) (string, int, error)

func Run

func Run(program string, args ...string) (int, error)

func RunShell

func RunShell(cmdline string) (int, error)

func RunShellSilent

func RunShellSilent(cmdline string) (int, error)

func RunSilent

func RunSilent(program string, args ...string) (int, error)

Types

type Executor added in v0.1.0

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

func New added in v0.1.0

func New(program string, args ...string) *Executor

New returns an *Executor that will run the program with arguments

func NewShell added in v0.1.0

func NewShell(cmdline string) *Executor

NewShell returns an *Executor that will run the command line in a shell

func (*Executor) Capture added in v0.1.0

func (e *Executor) Capture() (string, int, error)

Capture executes the command and return the output and the exit code

func (*Executor) Run added in v0.1.0

func (e *Executor) Run() (int, error)

Run executes the command and returns the exit code

func (*Executor) SetCwd added in v0.1.0

func (e *Executor) SetCwd(cwd string) *Executor

SetCwd change the current working directory the command will be run in

Jump to

Keyboard shortcuts

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