Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface { OSExecCommand GetPath() string GetDir() string GetArgs() []string String() string }
type File ¶
type File interface { Chdir() error Chmod(mode os.FileMode) error Chown(uid, gid int) error Close() error Fd() uintptr Name() string Read(b []byte) (n int, err error) ReadAt(b []byte, off int64) (n int, err error) Readdir(n int) ([]os.FileInfo, error) Readdirnames(n int) (names []string, err error) Seek(offset int64, whence int) (ret int64, err error) Stat() (os.FileInfo, error) Sync() error Truncate(size int64) error Write(b []byte) (n int, err error) WriteAt(b []byte, off int64) (n int, err error) WriteString(s string) (n int, err error) }
type OS ¶
type OS interface { Command(cmd string, args ...string) Command LookPath(file string) (string, error) TempFile(dir, prefix string) (f File, err error) Copy(dst io.Writer, src io.Reader) (written int64, err error) Walk(path string, f filepath.WalkFunc) error Getwd() (string, error) }
OS is our indirection of the pieces from os and os/exec that we use, so we can mock those functions in our tests.
type OSExecCommand ¶
type OSExecCommand interface { CombinedOutput() ([]byte, error) Output() ([]byte, error) Run() error Start() error StderrPipe() (io.ReadCloser, error) StdinPipe() (io.WriteCloser, error) StdoutPipe() (io.ReadCloser, error) Wait() error }
OSExecCommand is the interface wrapping all functions on exec.Cmd
Click to show internal directories.
Click to hide internal directories.