shell

package
v0.0.0-...-846a3b6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(logger *logger.Logger, name string, args ...string) error

Exec - execute external process Synchronous operation. Waits until process finished

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

func GetCmdExitCode(err error) (retCode int, retErr error)

GetCmdExitCode - try to get command ExitCode from error received from 'Exec(...)'

func IsRunning

func IsRunning(cmd *exec.Cmd) bool

IsRunning - true when process is currently running

func Kill

func Kill(cmd *exec.Cmd) error

Kill trying to kill process

func StartConsoleReaders

func StartConsoleReaders(cmd *exec.Cmd, outProcessFunc func(text string, isError bool)) error

StartConsoleReaders - init function-reader of process console text

Types

This section is empty.

Jump to

Keyboard shortcuts

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