Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandWrapper ¶
type CommandWrapper struct {
// contains filtered or unexported fields
}
CommandWrapper represents a wrapper around an executable command
func NewCommandWrapper ¶
func NewCommandWrapper(name string, args ...string) *CommandWrapper
NewCommandWrapper creates a new CommandWrapper with the provided name and args. It returns a pointer to the created CommandWrapper.
func (*CommandWrapper) Run ¶
func (wrapper *CommandWrapper) Run() (stdout, stderr []byte, err error)
Run executes the command and returns its output as arrays of bytes representing stdout and stderr, along with any error that occurred. It returns three values, which are based on the results of the command execution: stdout []byte: The standard output generated by the command. stderr []byte: The standard error generated by the command. err error: An error, if one occurred while executing the command.
Click to show internal directories.
Click to hide internal directories.