Versions in this module Expand all Collapse all v0 v0.0.0 Dec 13, 2025 Changes in this version + const EOL + const STDIO_INHERIT + const STDIO_NULL + const STDIO_PIPED + var Registry = &ExecutableRegistry + func Find(name string, options *WhichOptions) (string, error) + func Register(name string, exe *Executable) + func SetEnvLike(e EnvLike) + func SetLogger(f func(cmd *Cmd)) + func Which(command string) (string, bool) + func WhichFirst(command string, options *WhichOptions) (string, bool) + type Cmd struct + TempFile *string + func Command(command string) *Cmd + func CommandContext(ctx context.Context, command string) *Cmd + func New(name string, args ...string) *Cmd + func NewContext(ctx context.Context, name string, args ...string) *Cmd + func (c *Cmd) AppendArgs(args ...string) *Cmd + func (c *Cmd) AppendEnv(env ...string) *Cmd + func (c *Cmd) DisableLogger() + func (c *Cmd) Output() (*Result, error) + func (c *Cmd) Pipe(subcommands ...*Cmd) *Pipeline + func (c *Cmd) PipeCommand(subcommands ...string) *Pipeline + func (c *Cmd) PrependArgs(args ...string) *Cmd + func (c *Cmd) PrependEnv(env ...string) *Cmd + func (c *Cmd) Quiet() (*Result, error) + func (c *Cmd) Run() (*Result, error) + func (c *Cmd) SetLogger(f func(cmd *Cmd)) + func (c *Cmd) Start() error + func (c *Cmd) Wait() error + func (c *Cmd) WithArgs(args ...string) *Cmd + func (c *Cmd) WithCwd(dir string) *Cmd + func (c *Cmd) WithEnv(env ...string) *Cmd + func (c *Cmd) WithEnvMap(env map[string]string) *Cmd + func (c *Cmd) WithStderr(stderr io.Writer) *Cmd + func (c *Cmd) WithStdin(stdin io.Reader) *Cmd + func (c *Cmd) WithStdio(stdin, stdout, stderr int) *Cmd + func (c *Cmd) WithStdout(stdout io.Writer) *Cmd + type EnvLike interface + Expand func(s string) (string, error) + Get func(key string) string + Set func(key, value string) + SplitPath func() []string + func GetEnvLike() EnvLike + type Executable struct + Darwin []string + Linux []string + Name string + Path string + Variable string + Windows []string + type ExecutableRegistry struct + func (r *ExecutableRegistry) Find(name string, options *WhichOptions) (string, error) + func (r *ExecutableRegistry) Get(name string) (*Executable, bool) + func (r *ExecutableRegistry) Has(name string) bool + func (r *ExecutableRegistry) Register(name string, exe *Executable) + func (r *ExecutableRegistry) Set(name string, exe *Executable) + type Pipeline struct + func (p *Pipeline) Output() (*Result, error) + func (p *Pipeline) Pipe(subcommands ...*Cmd) *Pipeline + func (p *Pipeline) PipeCommand(subcommands ...string) *Pipeline + func (p *Pipeline) Run() (*Result, error) + type Result struct + Args []string + Code int + EndedAt time.Time + FileName string + StartedAt time.Time + Stderr []byte + Stdout []byte + TempFile *string + func Output(command string) (*Result, error) + func Run(command string) (*Result, error) + func (o *Result) ErrorJson() (interface{}, error) + func (o *Result) ErrorLines() []string + func (o *Result) ErrorText() string + func (o *Result) IsOk() bool + func (o *Result) Json() (interface{}, error) + func (o *Result) Lines() []string + func (o *Result) Text() string + func (o *Result) ToError() error + func (o *Result) ToErrorIf(f func(o *Result) bool) error + func (o *Result) Validate() (bool, error) + func (o *Result) ValidateWith(cb func(o *Result) (bool, error)) (bool, error) + type WhichOptions struct + PrependPaths []string + UseCache bool