cmd

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StdinKey settingType = iota
	StdoutKey
	StderrKey
	EnvKey
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandExecutor

type CommandExecutor interface {
	RunStdout(ctx context.Context, command string, args ...string) (int, error)
	RunQuiet(ctx context.Context, command string, args ...string) (int, error)
	Run(ctx context.Context, command string, args []string, settings ...Setting) (int, error)
}

func NewCommandExecutor

func NewCommandExecutor(l log.TraceLogger) CommandExecutor

type Setting

type Setting utils.KeyValue[settingType, any]

func Env

func Env(env []string) Setting

func Stderr

func Stderr(stderr io.Writer) Setting

func Stdin

func Stdin(stdin io.Reader) Setting

func Stdout

func Stdout(stdout io.Writer) Setting

Jump to

Keyboard shortcuts

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