Documentation ¶
Index ¶
- type ExecuteInterface
- type Executor
- func (e *Executor) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
- func (e *Executor) ExecuteWithStdin(binary string, args []string, stdinString string, timeout time.Duration) (string, error)
- func (e *Executor) ExecuteWithStdinPipe(binary string, args []string, stdinString string, timeout time.Duration) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecuteInterface ¶
type ExecuteInterface interface { Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error) ExecuteWithStdin(binary string, args []string, stdinString string, timeout time.Duration) (string, error) ExecuteWithStdinPipe(binary string, args []string, stdinString string, timeout time.Duration) (string, error) }
ExecuteInterface is the interface for executing commands.
type Executor ¶
type Executor struct{}
Executor is the implementation of ExecuteInterface.
func (*Executor) Execute ¶
func (e *Executor) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
Execute executes the given command with the specified environment variables, binary, and arguments. It returns the command's output and any occurred error.
Click to show internal directories.
Click to hide internal directories.