exec

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd interface {
	gestalt.Component
	FN(CmdFn) Cmd
	Dir(string) Cmd
	AddEnv(string, string) Cmd
}

func EXEC

func EXEC(name, path string, args ...string) Cmd

func NewCmd

func NewCmd(name string, path string, args []string) Cmd

func SH

func SH(name, cmd string, args ...string) Cmd

type CmdFn

type CmdFn func(*bufio.Reader, gestalt.Evaluator) error

func Capture

func Capture(columns ...string) CmdFn

type Error

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

func (*Error) Detail

func (e *Error) Detail() string

func (*Error) Error

func (e *Error) Error() string

func (*Error) Stderr

func (e *Error) Stderr() string

func (*Error) Stdout

func (e *Error) Stdout() string

type PipeFilter

type PipeFilter func(PipeObject, gestalt.Evaluator) bool

type PipeObject

type PipeObject map[string]string

type PipeParser

type PipeParser func(*bufio.Reader, gestalt.Evaluator) ([]PipeObject, error)

type PipeStage

type PipeStage func([]PipeObject, gestalt.Evaluator) ([]PipeObject, error)

type PipeValidator

type PipeValidator func([]PipeObject) error

type Pipeline

type Pipeline interface {
	Capture(...string) CmdFn
	CaptureAll() CmdFn
	Done() CmdFn

	GrepField(string, string) Pipeline
	GrepWith(PipeFilter) Pipeline

	EnsureCount(int) Pipeline
	EnsureWith(PipeValidator) Pipeline
}

func LineParser

func LineParser(fn func(string, gestalt.Evaluator) (PipeObject, error)) Pipeline

func NewPipeline

func NewPipeline(fn PipeParser) Pipeline

func ParseColumns

func ParseColumns(columns ...string) Pipeline

func ParseColumnsWith

func ParseColumnsWith(fn func(string) []string, columns ...string) Pipeline

func ParseKV

func ParseKV(sep string, columns ...string) Pipeline

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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