Documentation ¶
Index ¶
- type OsHelper
- type OsHelperImpl
- func (h OsHelperImpl) FileExists(filename string) bool
- func (h OsHelperImpl) KillCommand(cmd *exec.Cmd, signal os.Signal) error
- func (h OsHelperImpl) ReadFile(filename string) (string, error)
- func (h OsHelperImpl) RunCommand(executable string, args ...string) (string, error)
- func (h OsHelperImpl) Sleep(duration time.Duration)
- func (h OsHelperImpl) StartCommand(logFileName string, executable string, args ...string) (*exec.Cmd, error)
- func (h OsHelperImpl) WaitForCommand(cmd *exec.Cmd) chan error
- func (h OsHelperImpl) WriteStringToFile(filename string, contents string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OsHelper ¶
type OsHelper interface { RunCommand(executable string, args ...string) (string, error) StartCommand(logFileName string, executable string, args ...string) (*exec.Cmd, error) WaitForCommand(cmd *exec.Cmd) chan error FileExists(filename string) bool ReadFile(filename string) (string, error) WriteStringToFile(filename string, contents string) error Sleep(duration time.Duration) KillCommand(cmd *exec.Cmd, signal os.Signal) error }
type OsHelperImpl ¶
type OsHelperImpl struct{}
func NewImpl ¶
func NewImpl() *OsHelperImpl
func (OsHelperImpl) FileExists ¶
func (h OsHelperImpl) FileExists(filename string) bool
func (OsHelperImpl) KillCommand ¶
func (OsHelperImpl) ReadFile ¶
func (h OsHelperImpl) ReadFile(filename string) (string, error)
Read the whole file, panic on err
func (OsHelperImpl) RunCommand ¶
func (h OsHelperImpl) RunCommand(executable string, args ...string) (string, error)
Runs command with stdout and stderr pipes connected to process
func (OsHelperImpl) Sleep ¶
func (h OsHelperImpl) Sleep(duration time.Duration)
func (OsHelperImpl) StartCommand ¶
func (OsHelperImpl) WaitForCommand ¶
func (h OsHelperImpl) WaitForCommand(cmd *exec.Cmd) chan error
func (OsHelperImpl) WriteStringToFile ¶
func (h OsHelperImpl) WriteStringToFile(filename string, contents string) error
Overwrite the contents, creating if necessary. Panic on err
Click to show internal directories.
Click to hide internal directories.