Documentation ¶
Index ¶
- type LocalShell
- func (c *LocalShell) CatchOutput() bool
- func (c *LocalShell) Execute(name string, arg ...string) ([]byte, error)
- func (c *LocalShell) ExecuteWithOptions(name string, args []string, opts ...Opt) ([]byte, error)
- func (c *LocalShell) ExitCodeOfCommand(command string) int
- func (c *LocalShell) Pipeline(cmds ...*exec.Cmd) (pipeLineOutput, collectedStandardError []byte, pipeLineError error)
- func (c *LocalShell) Reset()
- func (c *LocalShell) RunCommand(args []string, opts ...Opt) ([]byte, error)
- func (c *LocalShell) SuppressOutput() bool
- type MockShell
- func (c *MockShell) Execute(name string, args ...string) ([]byte, error)
- func (c *MockShell) ExecuteWithOptions(name string, args []string, opts ...Opt) ([]byte, error)
- func (c *MockShell) ExitCodeOfCommand(command string) int
- func (c *MockShell) Pipeline(cmds ...*exec.Cmd) (pipeLineOutput, collectedStandardError []byte, pipeLineError error)
- func (c *MockShell) RunCommand(args []string, opts ...Opt) ([]byte, error)
- type Opt
- type Shell
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalShell ¶
func NewLocalShellWithOpts ¶
func NewLocalShellWithOpts(opts ...Opt) *LocalShell
func (*LocalShell) CatchOutput ¶
func (c *LocalShell) CatchOutput() bool
func (*LocalShell) Execute ¶
func (c *LocalShell) Execute(name string, arg ...string) ([]byte, error)
func (*LocalShell) ExecuteWithOptions ¶
func (*LocalShell) ExitCodeOfCommand ¶
func (c *LocalShell) ExitCodeOfCommand(command string) int
ExitCodeOfCommand runs a command and returns its exit code.
func (*LocalShell) Pipeline ¶
func (c *LocalShell) Pipeline(cmds ...*exec.Cmd) (pipeLineOutput, collectedStandardError []byte, pipeLineError error)
Pipeline runs cmds piped after each other.
func (*LocalShell) Reset ¶
func (c *LocalShell) Reset()
func (*LocalShell) RunCommand ¶
func (c *LocalShell) RunCommand(args []string, opts ...Opt) ([]byte, error)
RunCommand is going to run a command depending on the caller's operating system.
func (*LocalShell) SuppressOutput ¶
func (c *LocalShell) SuppressOutput() bool
type MockShell ¶
func (*MockShell) ExecuteWithOptions ¶
func (*MockShell) ExitCodeOfCommand ¶
ExitCodeOfCommand runs a command and returns its exit code.
type Shell ¶
type Shell interface { Execute(name string, args ...string) (output []byte, err error) ExecuteWithOptions(name string, args []string, opts ...Opt) (output []byte, err error) Pipeline(cmds ...*exec.Cmd) (pipeLineOutput, collectedStandardError []byte, pipeLineError error) RunCommand(args []string, opts ...Opt) (output []byte, err error) ExitCodeOfCommand(command string) int }
Click to show internal directories.
Click to hide internal directories.