command

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 8 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 {
	Program string
	Args    []string
}

func (Command) Argv

func (c Command) Argv() []string

func (Command) Run

func (c Command) Run(ctx context.Context) Result

func (Command) RunWith

func (c Command) RunWith(ctx context.Context, options RunOptions) Result

func (Command) String

func (c Command) String() string

func (Command) With

func (c Command) With(ctx context.Context, options RunOptions) Result

type ExecRunner

type ExecRunner struct{}

func (ExecRunner) Run

func (ExecRunner) Run(ctx context.Context, cmd Command, options RunOptions) Result

type Result

type Result struct {
	Command Command
	Stdout  []byte
	Stderr  []byte
	Err     error
}

type RunOptions

type RunOptions struct {
	Dir              string
	Env              map[string]string
	Stdin            io.Reader
	Stdout           io.Writer
	Stderr           io.Writer
	DisableBuffering bool
	Runner           Runner
}

type Runner

type Runner interface {
	Run(context.Context, Command, RunOptions) Result
}

Jump to

Keyboard shortcuts

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