Documentation ¶
Index ¶
- Variables
- type Command
- 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(d string)
- func (c *Command) SetEnv(e []string)
- func (c *Command) Stderr(stderr io.Writer)
- func (c *Command) Stdout(stdout io.Writer)
- type Execution
Constants ¶
This section is empty.
Variables ¶
View Source
var ExecCommand = exec.Command
ExecCommand defines how to execute os commands
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command defines the information required for executing a call to any executable
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 ¶ added in v1.45.0
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.
Click to show internal directories.
Click to hide internal directories.