shell

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommandAndGetOutput

func RunCommandAndGetOutput(command Command) (string, error)

RunCommandAndGetOutput runs the given command and returns the output as a string or an error if the command fails.

Types

type Command

type Command struct {
	Name       string
	Args       []string
	WorkingDir string
	Env        map[string]string
}

Command is a command to be run in a shell.

type ErrWithCmdOutput

type ErrWithCmdOutput struct {
	Underlying error
	Output     *output
}

ErrWithCmdOutput is an error that includes the output of the command.

func (*ErrWithCmdOutput) Error

func (e *ErrWithCmdOutput) Error() string

Jump to

Keyboard shortcuts

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