exec

package
v2.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

func New

func New() *Executor

func (*Executor) Exec

func (e *Executor) Exec(ctx context.Context, exePath string, args ...string) (int, error)

func (*Executor) ExecCommand added in v2.11.0

func (e *Executor) ExecCommand(cmd *exec.Cmd) (int, error)

func (*Executor) ExecWithEnvs

func (e *Executor) ExecWithEnvs(ctx context.Context, exePath string, args, envs []string) (int, error)

func (*Executor) ExecWithEnvsAndGetCombinedOutput

func (e *Executor) ExecWithEnvsAndGetCombinedOutput(ctx context.Context, exePath string, args, envs []string) (string, int, error)

func (*Executor) ExecXSys

func (e *Executor) ExecXSys(exePath string, args ...string) error

func (*Executor) HdiutilAttach

func (e *Executor) HdiutilAttach(ctx context.Context, dmgPath, mountPoint string) (int, error)

func (*Executor) HdiutilDetach

func (e *Executor) HdiutilDetach(ctx context.Context, mountPath string) (int, error)

func (*Executor) UnarchivePkg added in v2.7.0

func (e *Executor) UnarchivePkg(ctx context.Context, pkgFilePath, dest string) (int, error)

type Mock

type Mock struct {
	ExitCode int
	Err      error
	Output   string
}

func (*Mock) Exec

func (e *Mock) Exec(ctx context.Context, exePath string, args ...string) (int, error)

func (*Mock) ExecWithEnvs

func (e *Mock) ExecWithEnvs(ctx context.Context, exePath string, args, envs []string) (int, error)

func (*Mock) ExecWithEnvsAndGetCombinedOutput

func (e *Mock) ExecWithEnvsAndGetCombinedOutput(ctx context.Context, exePath string, args, envs []string) (string, int, error)

func (*Mock) ExecXSys

func (e *Mock) ExecXSys(exePath string, args ...string) error

func (*Mock) HdiutilAttach

func (e *Mock) HdiutilAttach(ctx context.Context, dmgPath, mountPoint string) (int, error)

func (*Mock) HdiutilDetach

func (e *Mock) HdiutilDetach(ctx context.Context, mountPath string) (int, error)

func (*Mock) UnarchivePkg added in v2.7.0

func (e *Mock) UnarchivePkg(ctx context.Context, pkgFilePath, dest string) (int, error)

Jump to

Keyboard shortcuts

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