command

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pipe

func Pipe(pipe io.ReadCloser, event OutputEvent)

Types

type Command

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

func (*Command) CustomRun

func (command *Command) CustomRun(outEvent OutputEvent, errEvent OutputEvent) string

func (*Command) Run

func (command *Command) Run() []string

func (*Command) Write

func (command *Command) Write(b []byte) error

type Creator

type Creator interface {
	Create(command string, arg ...string) Executable
}

type Executable

type Executable interface {
	Write(b []byte) error
	CustomRun(outEvent OutputEvent, errEvent OutputEvent) string
	Run() []string
}

type Factory

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

func NewFactory

func NewFactory(quiet bool) Factory

func (Factory) Create

func (c Factory) Create(command string, arg ...string) Executable

type OutputEvent

type OutputEvent = func(string)

Jump to

Keyboard shortcuts

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