cmd

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicCmd

type BasicCmd struct {
	Name   string
	Args   []string
	Stdin  *os.File
	Stdout *os.File
	Stderr *os.File
}

func NewBasicCmd

func NewBasicCmd(cmd string) *BasicCmd

func (*BasicCmd) CombinedOutput

func (cmd *BasicCmd) CombinedOutput() (string, error)

func (*BasicCmd) SetCmd

func (cmd *BasicCmd) SetCmd(name string) Cmd

func (*BasicCmd) Spawn

func (cmd *BasicCmd) Spawn() error

func (*BasicCmd) WithArg

func (cmd *BasicCmd) WithArg(arg string) Cmd

func (*BasicCmd) WithArgs

func (cmd *BasicCmd) WithArgs(args ...string) Cmd

type Cmd

type Cmd interface {
	SetCmd(name string) Cmd
	WithArg(arg string) Cmd
	WithArgs(args ...string) Cmd
	CombinedOutput() (string, error)
	Spawn() error
}

type MockCmd

type MockCmd struct {
	Name string
	Args []string
}

func NewMockCmd

func NewMockCmd(cmd string) *MockCmd

func (*MockCmd) CombinedOutput

func (cmd *MockCmd) CombinedOutput() (string, error)

func (*MockCmd) SetCmd

func (cmd *MockCmd) SetCmd(name string) Cmd

func (*MockCmd) Spawn

func (cmd *MockCmd) Spawn() error

func (*MockCmd) WithArg

func (cmd *MockCmd) WithArg(arg string) Cmd

func (*MockCmd) WithArgs

func (cmd *MockCmd) WithArgs(args ...string) Cmd

Jump to

Keyboard shortcuts

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