exec

package
v0.0.0-...-ad7ab41 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

func (*Command) LogValue

func (cmd *Command) LogValue() slog.Value

func (*Command) Run

func (cmd *Command) Run() error

func (*Command) RunOutput

func (cmd *Command) RunOutput() (string, string, error)

RunOutput runs the command and returns both its standard output and standard error as a trimmed string.

func (*Command) RunStderr

func (cmd *Command) RunStderr() (string, error)

RunStderr runs the command and returns its standard error as a trimmed string.

func (*Command) RunStdout

func (cmd *Command) RunStdout() (string, error)

RunStdout runs the command and returns its standard output as a trimmed string.

func (*Command) Start

func (cmd *Command) Start() error

func (*Command) StderrPipe

func (cmd *Command) StderrPipe() (io.ReadCloser, error)

func (*Command) StdoutPipe

func (cmd *Command) StdoutPipe() (io.ReadCloser, error)

type Commander

type Commander interface {
	Command(ctx context.Context, args ...string) *Command
}

type Executable

type Executable string

func Lookup

func Lookup(name string) (Executable, error)

func (Executable) Command

func (exe Executable) Command(ctx context.Context, args ...string) *Command

type OverrideableWriter

type OverrideableWriter interface {
	// contains filtered or unexported methods
}

OverrideableWriter can be used to indicate that values in Command.Stdout and Command.Stderr are safe to override when requested.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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