Versions in this module Expand all Collapse all v1 v1.0.0 Jul 24, 2025 Changes in this version + func CloseReader(r io.Reader) + func CloseWriter(w io.Writer) + func CmdRan(err error) bool + func ExitStatus(err error) int + func IsPipe(rw any) bool + func LookPath(file string) (string, error) + func MkdirAll(path string, perm os.FileMode) error + func Output(cmd string, args ...string) (string, error) + func PrintCmd(cmd string, err error) + func RemoveAll(path string) error + func Run(cmd string, args ...string) error + func SetMajor(c *Config) + func SetMinor(c *Config) + func SetSilent(c *Config) + func SetVerbose(c *Config) + func Start(cmd string, args ...string) (*exec.Cmd, error) + type Cmd = exec.Cmd + type CmdIO struct + Cmd *exec.Cmd + func NewCmdIO(c *Config) *CmdIO + func (c *CmdIO) String() string + type Config struct + Buffer bool + Dir string + Echo io.Writer + Env map[string]string + PrintOnly bool + StdIO StdIO + func Major() *Config + func Minor() *Config + func Silent() *Config + func Verbose() *Config + func (c *Config) GetWriter(w io.Writer, err error) io.Writer + func (c *Config) MkdirAll(path string, perm os.FileMode) error + func (c *Config) Output(cmd string, args ...string) (string, error) + func (c *Config) OutputIO(cio *CmdIO, cmd string, args ...string) (string, error) + func (c *Config) PrintCmd(cmd string, err error) + func (c *Config) RemoveAll(path string) error + func (c *Config) Run(cmd string, args ...string) error + func (c *Config) RunIO(cio *CmdIO, cmd string, args ...string) error + func (c *Config) SetEnv(key, val string) *Config + func (c *Config) SetStderr(w io.Writer) *Config + func (c *Config) SetStdin(r io.Reader) *Config + func (c *Config) SetStdout(w io.Writer) *Config + func (c *Config) Start(cmd string, args ...string) (*exec.Cmd, error) + func (c *Config) StartIO(cio *CmdIO, cmd string, args ...string) error + func (t *Config) SetBuffer(v bool) *Config + func (t *Config) SetDir(v string) *Config + func (t *Config) SetEcho(v io.Writer) *Config + func (t *Config) SetPrintOnly(v bool) *Config + func (t *Config) SetStdIO(v StdIO) *Config + type ReadWrapper struct + type StdIO struct + Err io.Writer + In io.Reader + Out io.Writer + func (st *StdIO) ErrPrint(v ...any) + func (st *StdIO) ErrPrintf(f string, v ...any) + func (st *StdIO) ErrPrintln(v ...any) + func (st *StdIO) GetWrapped() *StdIO + func (st *StdIO) NewWrappers(o *StdIO) + func (st *StdIO) OutIsPipe() bool + func (st *StdIO) Print(v ...any) + func (st *StdIO) Printf(f string, v ...any) + func (st *StdIO) Println(v ...any) + func (st *StdIO) Set(o *StdIO) *StdIO + func (st *StdIO) SetAll(out, err io.Writer, in io.Reader) + func (st *StdIO) SetFromOS() + func (st *StdIO) SetToOS() *StdIO + func (st *StdIO) SetWrappedErr(w io.Writer) + func (st *StdIO) SetWrappedIn(r io.Reader) + func (st *StdIO) SetWrappedOut(w io.Writer) + func (st *StdIO) SetWrappers(o *StdIO) *StdIO + type StdIOState struct + ErrStack stack.Stack[io.Writer] + ErrStart int + InStack stack.Stack[io.Reader] + InStart int + OutStack stack.Stack[io.Writer] + OutStart int + PipeIn stack.Stack[*os.File] + func (st *StdIOState) ErrIsInOut(er io.Writer) bool + func (st *StdIOState) PopErr() io.Writer + func (st *StdIOState) PopIn() io.Reader + func (st *StdIOState) PopOut() io.Writer + func (st *StdIOState) PopToStart() + func (st *StdIOState) PushErr(err io.Writer) + func (st *StdIOState) PushIn(in io.Reader) + func (st *StdIOState) PushOut(out io.Writer) + func (st *StdIOState) PushOutPipe() + func (st *StdIOState) StackStart() + type WriteWrapper struct