os_helper

package
v0.0.0-...-df6de72 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2019 License: Apache-2.0 Imports: 4 Imported by: 7

Documentation

Index

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)
}

type OsHelperImpl

type OsHelperImpl struct{}

func NewImpl

func NewImpl() *OsHelperImpl

func (OsHelperImpl) FileExists

func (h OsHelperImpl) FileExists(filename string) bool

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 (h OsHelperImpl) StartCommand(logFileName string, executable string, args ...string) (*exec.Cmd, error)

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

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL