Documentation ¶
Index ¶
- func Exec(logger *logger.Logger, name string, args ...string) error
- func ExecAndGetOutput(logger *logger.Logger, maxRetBuffSize int, textToHideInLog string, name string, ...) (outText string, outErrText string, exitCode int, err error)
- func ExecAndProcessOutput(logger *logger.Logger, outProcessFunc func(text string, isError bool), ...) error
- func ExecEx(logger *logger.Logger, outChan chan<- string, errChan chan<- string, ...) error
- func GetCmdExitCode(err error) (retCode int, retErr error)
- func IsRunning(cmd *exec.Cmd) bool
- func Kill(cmd *exec.Cmd) error
- func StartConsoleReaders(cmd *exec.Cmd, outProcessFunc func(text string, isError bool)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecAndGetOutput ¶
func ExecAndGetOutput(logger *logger.Logger, maxRetBuffSize int, textToHideInLog string, name string, args ...string) (outText string, outErrText string, exitCode int, err error)
ExecAndGetOutput - execute external process and return it's console output
func ExecAndProcessOutput ¶
func ExecAndProcessOutput(logger *logger.Logger, outProcessFunc func(text string, isError bool), textToHideInLog string, name string, args ...string) error
ExecAndProcessOutput - execute external process Synchronous operation. Waits until process finished
func ExecEx ¶
func ExecEx(logger *logger.Logger, outChan chan<- string, errChan chan<- string, textToHideInLog string, name string, args ...string) error
ExecEx - execute external process Synchronous operation. Waits until process finished
func GetCmdExitCode ¶
GetCmdExitCode - try to get command ExitCode from error received from 'Exec(...)'
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.