Documentation ¶
Index ¶
- type Cmd
- func (c *Cmd) CombinedOutput() ([]byte, error)
- func (c *Cmd) Environ() []string
- func (c *Cmd) Output() ([]byte, error)
- func (c *Cmd) Run() error
- func (c *Cmd) Start() error
- func (c *Cmd) StderrPipe() (io.ReadCloser, error)
- func (c *Cmd) StdinPipe() (io.WriteCloser, error)
- func (c *Cmd) StdoutPipe() (io.ReadCloser, error)
- func (c *Cmd) String() string
- func (c *Cmd) Wait() error
- type Cmder
- type Exec
- type MockCmd
- func (c *MockCmd) CombinedOutput() ([]byte, error)
- func (c *MockCmd) Environ() []string
- func (c *MockCmd) Output() ([]byte, error)
- func (c *MockCmd) Run() error
- func (c *MockCmd) Start() error
- func (c *MockCmd) StderrPipe() (io.ReadCloser, error)
- func (c *MockCmd) StdinPipe() (io.WriteCloser, error)
- func (c *MockCmd) StdoutPipe() (io.ReadCloser, error)
- func (c *MockCmd) String() string
- func (c *MockCmd) Wait() error
- type MockExec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
Cmd struct is a wrapper of exec.Cmd
func (*Cmd) CombinedOutput ¶
CombinedOutput is a wrapper of exec.Cmd CombinedOutput method
func (*Cmd) StderrPipe ¶
func (c *Cmd) StderrPipe() (io.ReadCloser, error)
StderrPipe is a wrapper of exec.Cmd StderrPipe method
func (*Cmd) StdinPipe ¶
func (c *Cmd) StdinPipe() (io.WriteCloser, error)
StdinPipe is a wrapper of exec.Cmd StdinPipe method
func (*Cmd) StdoutPipe ¶
func (c *Cmd) StdoutPipe() (io.ReadCloser, error)
StdoutPipe is a wrapper of exec.Cmd StdoutPipe method
type Cmder ¶
type Cmder interface { CombinedOutput() ([]byte, error) Environ() []string Output() ([]byte, error) Run() error Start() error StderrPipe() (io.ReadCloser, error) StdinPipe() (io.WriteCloser, error) StdoutPipe() (io.ReadCloser, error) String() string Wait() error }
Cmder is an interface to run a command
type Exec ¶
type Exec struct{}
Exec struct wrapps the OS Exec package
type MockCmd ¶
MockCmd struct is a mock of exec.Cmd
func (*MockCmd) CombinedOutput ¶
CombinedOutput is a mock of exec.Cmd CombinedOutput method
func (*MockCmd) StderrPipe ¶
func (c *MockCmd) StderrPipe() (io.ReadCloser, error)
StderrPipe is a mock of exec.Cmd StderrPipe method
func (*MockCmd) StdinPipe ¶
func (c *MockCmd) StdinPipe() (io.WriteCloser, error)
StdinPipe is a mock of exec.Cmd StdinPipe method
func (*MockCmd) StdoutPipe ¶
func (c *MockCmd) StdoutPipe() (io.ReadCloser, error)
StdoutPipe is a mock of exec.Cmd StdoutPipe method
Click to show internal directories.
Click to hide internal directories.