Documentation ¶
Index ¶
- Constants
- Variables
- type Command
- func (c *Command) AppendEnv(env []string)
- func (c *Command) GetExitCode() int
- func (c *Command) GetOsEnv() []string
- func (c *Command) GetStderr() io.Writer
- func (c *Command) GetStdout() io.Writer
- func (c *Command) RunExecutable(executable string, params ...string) error
- func (c *Command) RunExecutableInBackground(executable string, params ...string) (Execution, error)
- func (c *Command) RunShell(shell, script string) error
- func (c *Command) SetDir(dir string)
- func (c *Command) SetEnv(env []string)
- func (c *Command) Stderr(stderr io.Writer)
- func (c *Command) Stdin(stdin io.Reader)
- func (c *Command) Stdout(stdout io.Writer)
- type ExecRunner
- type Execution
- type ShellRunner
Constants ¶
const (
RelaxedURLRegEx = `` /* 200-byte string literal not displayed */
)
Variables ¶
var ExecCommand = exec.Command
ExecCommand defines how to execute os commands
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { ErrorCategoryMapping map[string][]string URLReportFileName string // contains filtered or unexported fields }
Command defines the information required for executing a call to any executable
func (*Command) GetExitCode ¶
GetExitCode allows to retrieve the exit code of a command execution
func (*Command) RunExecutable ¶
RunExecutable runs the specified executable with parameters !! While the cmd.Env is applied during command execution, it is NOT involved when the actual executable is resolved.
Thus the executable needs to be on the PATH of the current process and it is not sufficient to alter the PATH on cmd.Env.
func (*Command) RunExecutableInBackground ¶
RunExecutableInBackground runs the specified executable with parameters in the background non blocking !! While the cmd.Env is applied during command execution, it is NOT involved when the actual executable is resolved.
Thus the executable needs to be on the PATH of the current process and it is not sufficient to alter the PATH on cmd.Env.
type ExecRunner ¶
type ExecRunner interface { RunExecutable(executable string, params ...string) error RunExecutableInBackground(executable string, params ...string) (Execution, error) // contains filtered or unexported methods }
ExecRunner mock for intercepting calls to executables
type Execution ¶
Execution references a background process which is started by RunExecutableInBackground
type ShellRunner ¶
type ShellRunner interface { RunShell(shell string, command string) error // contains filtered or unexported methods }
ShellRunner mock for intercepting shell calls