shell

package
v0.3.0-8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL