Versions in this module Expand all Collapse all v0 v0.1.0 May 26, 2024 Changes in this version + type Cmd struct + func NewCmd(command string, args ...string) *Cmd + func (c Cmd) Compile() (Cmd, error) + func (c Cmd) CompileExec(executor ExecFunc) (Process, error) + func (c Cmd) Exec(executor ExecFunc) (Process, error) + func (c Cmd) MustCompile() Cmd + func (c Cmd) OSCmd() (*exec.Cmd, error) + func (c Cmd) Raw() []string + func (c Cmd) String() string + func (c Cmd) WithArg(arg string) Cmd + func (c Cmd) WithArgs(args ...string) Cmd + func (c Cmd) WithEnv(env ...string) Cmd + func (c Cmd) WithField(key string, value any) Cmd + func (c Cmd) WithFields(fields map[string]any, overwrite bool) Cmd + func (c Cmd) WithFormatter(formatter Formatter) Cmd + func (c Cmd) WithLocalOSEnv() Cmd + func (dd Cmd) Data() map[string]any + func (dd Cmd) Env() []string + type EvalFunc func(Output, string) (bool, error) + type ExecFunc func(Cmd) (Process, error) + type Formatter func([]string) string + func QuoteIfSpaceFormatter(openQuote, closeQuote string) Formatter + func QuoteLastArgFormatter(openQuote, closeQuote string) Formatter + func SpaceSepFormatter() Formatter + type Output map[string]any + func NewOutput(source string) Output + func (o Output) Evaluate(evaluator EvalFunc, expression string) (bool, error) + type Process interface + Close func() + Kill func() error + Result func() (*Result, error) + Signal func(os.Signal) error + Write func(string) error + type Result struct + ExitCode int + StdErr string + StdOut string + TotalTime time.Duration + func (r Result) CombinedOutput() Output + func (r Result) Output(useErr bool) Output + type Script struct + func NewScript(raw string) *Script + func NewScriptFromFile(path string) (*Script, error) + func NewScriptFromHTTP(link string) (*Script, error) + func (dd Script) Data() map[string]any + func (dd Script) Env() []string + func (s Script) Cmd() Cmd + func (s Script) Compile() (Script, error) + func (s Script) MustCompile() Script + func (s Script) Raw() string + func (s Script) WithEnv(env ...string) Script + func (s Script) WithField(key string, value any) Script + func (s Script) WithFields(fields map[string]any, overwrite bool) Script + func (s Script) WithLocalOSEnv() Script + func (s Script) WithSubcommand(sc Subcommand) Script + type Subcommand []string + var SCAsh Subcommand = []string{ ... } + var SCBash Subcommand = []string{ ... } + var SCBinary Subcommand = nil + var SCPython Subcommand = []string{ ... } + var SCPython3 Subcommand = []string{ ... } + var SCShell Subcommand = []string{ ... }