Documentation ¶
Index ¶
- func MakeCommand(workingDir string, path string, args []string, ctx IContext) *exec.Cmd
- func RunCommand(cmd ICommand, ctx IContext) error
- type Command
- func (cmd Command) CombinedOutput() ([]byte, error)
- func (cmd Command) GetArgs() []string
- func (cmd Command) GetDir() string
- func (cmd Command) GetProcess() *os.Process
- func (cmd Command) GetStdErr() *bytes.Buffer
- func (cmd Command) GetStdOut() *bytes.Buffer
- func (cmd Command) SetStderr(stderr *bytes.Buffer)
- func (cmd Command) SetStdout(stdout *bytes.Buffer)
- func (cmd Command) Signal(process *os.Process, signal os.Signal) error
- func (cmd Command) Start() error
- func (cmd Command) Wait() error
- type Context
- type ICommand
- type IContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeCommand ¶
func RunCommand ¶
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func NewCommand ¶
func (Command) CombinedOutput ¶
func (Command) GetProcess ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext(timer int) (Context, context.CancelFunc)
type ICommand ¶
type ICommand interface { CombinedOutput() ([]byte, error) Start() error Wait() error GetProcess() *os.Process SetStderr(*bytes.Buffer) SetStdout(*bytes.Buffer) GetArgs() []string GetDir() string Signal(process *os.Process, signal os.Signal) error GetStdOut() *bytes.Buffer GetStdErr() *bytes.Buffer }
Click to show internal directories.
Click to hide internal directories.