Documentation ¶
Index ¶
- Variables
- func ArgumentsCopyTo(from map[string]interface{}, to map[string]interface{}) map[string]interface{}
- func ArgumentsToStringArray(args map[string]interface{}) []string
- type ExecutablePathProvider
- type ExplicitExecutablePathString
- type ExternalProcess
- func (process *ExternalProcess) ClearArguments()
- func (process *ExternalProcess) Dispose()
- func (process *ExternalProcess) FullConsoleCommand() string
- func (process *ExternalProcess) IsRunning() bool
- func (process *ExternalProcess) Launch(debugOutput bool)
- func (process *ExternalProcess) Stop() error
- func (process *ExternalProcess) Wait() error
Constants ¶
This section is empty.
Variables ¶
var ( // NoArgumentValue indicates flag has name but no value to provide, // example: "--someflag" NoArgumentValue interface{} = &struct{}{} // stub object // NoArgument indicates the argument should be omitted from console command NoArgument = "" // NoArgumentNil indicates the argument should be omitted from console command NoArgumentNil interface{} // =nil )
Functions ¶
func ArgumentsCopyTo ¶
ArgumentsCopyTo helps to append commandline arguments from one map to another
func ArgumentsToStringArray ¶
ArgumentsToStringArray converts map to an array of command line arguments taking in account NoArgumentValue and NoArgument indicators above
Types ¶
type ExecutablePathProvider ¶
type ExecutablePathProvider interface { // Executable returns full path to an executable target file Executable() string }
ExecutablePathProvider wraps class responsible for executable path resolution
type ExplicitExecutablePathString ¶
type ExplicitExecutablePathString struct {
PathString string
}
func (*ExplicitExecutablePathString) Executable ¶
func (pth *ExplicitExecutablePathString) Executable() string
type ExternalProcess ¶
type ExternalProcess struct { // CommandName stores console command name CommandName string // Arguments stores console command arguments Arguments []string // WaitForExit set to true tells the Launch() // to hold until the process finish it's job WaitForExit bool // contains filtered or unexported fields }
ExternalProcess is a helper class wrapping command line execution
func (*ExternalProcess) ClearArguments ¶
func (process *ExternalProcess) ClearArguments()
ClearArguments clears the Arguments list
func (*ExternalProcess) Dispose ¶
func (process *ExternalProcess) Dispose()
Dispose implements integration.LeakyAsset behaviour
func (*ExternalProcess) FullConsoleCommand ¶
func (process *ExternalProcess) FullConsoleCommand() string
FullConsoleCommand returns full console command string
func (*ExternalProcess) IsRunning ¶
func (process *ExternalProcess) IsRunning() bool
IsRunning indicates when ext process is working
func (*ExternalProcess) Launch ¶
func (process *ExternalProcess) Launch(debugOutput bool)
Launch launches external process set the debugOutput true to redirect external process output to your os.Stdout and os.Stderr
func (*ExternalProcess) Stop ¶
func (process *ExternalProcess) Stop() error
Stop interrupts the running process, and waits until it exits properly. It is important that the process be stopped via Stop(), otherwise, it will persist unless explicitly killed.
func (*ExternalProcess) Wait ¶
func (process *ExternalProcess) Wait() error