oswrap

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecWrap

type ExecWrap interface {
	RunCommandDirect(command []string) error
	RunCommandStdoutToFile(outfileName string, command []string) error
	RunSyscallExec(args []string) error
}

ExecWrap wraps exec calls

func ExecWrapInstance

func ExecWrapInstance() ExecWrap

ExecWrapInstance gets the execution wrapper interface

type OsWrap

type OsWrap interface {
	Command(name string, arg ...string) *exec.Cmd
	Exec(argv0 string, argv []string, envv []string) (err error)
	Create(name string) (*os.File, error)
	LookPath(name string) (string, error)
	Environ() []string
	Remove(name string) error
	Stat(name string) (os.FileInfo, error)
	ReadFile(filename string) ([]byte, error)
	WriteFile(filename string, data []byte, perm os.FileMode) error
}

OsWrap wraps OS filesystem commands for mocking

func Instance added in v1.0.0

func Instance() OsWrap

oswrap.Instance gets an instance of the os wrapper

Directories

Path Synopsis
Package mock_oswrap is a generated GoMock package.
Package mock_oswrap is a generated GoMock package.

Jump to

Keyboard shortcuts

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