command

package
v2.0.0-alpha.15 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 7 Imported by: 147

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	PrintableCommandArgs() string
	Run() error
	RunAndReturnExitCode() (int, error)
	RunAndReturnTrimmedOutput() (string, error)
	RunAndReturnTrimmedCombinedOutput() (string, error)
	Start() error
	Wait() error
}

Command ...

type ErrorFinder

type ErrorFinder func(out string) []string

ErrorFinder ...

type Factory

type Factory interface {
	Create(name string, args []string, opts *Opts) Command
}

Factory ...

func NewFactory

func NewFactory(envRepository env.Repository) Factory

NewFactory ...

type Opts

type Opts struct {
	Stdout      io.Writer
	Stderr      io.Writer
	Stdin       io.Reader
	Env         []string
	Dir         string
	ErrorFinder ErrorFinder
}

Opts ...

Jump to

Keyboard shortcuts

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