exec

package
v1.34.0-2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 8 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 (exe *Executor) Exec(ctx context.Context, exePath string, args []string) (int, error)

func (*Executor) ExecWithEnvs added in v1.26.0

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

func (*Executor) ExecWithEnvsAndGetCombinedOutput added in v1.31.0

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

func (*Executor) ExecXSys

func (exe *Executor) ExecXSys(exePath string, args []string) error

func (*Executor) GoBuild added in v1.10.0

func (exe *Executor) GoBuild(ctx context.Context, exePath, src, exeDir string) (int, error)

func (*Executor) GoInstall added in v1.10.0

func (exe *Executor) GoInstall(ctx context.Context, path, gobin string) (int, error)

type Mock added in v1.15.0

type Mock struct {
	ExitCode int
	Err      error
	Output   string
}

func (*Mock) Exec added in v1.15.0

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

func (*Mock) ExecWithEnvs added in v1.26.0

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

func (*Mock) ExecWithEnvsAndGetCombinedOutput added in v1.31.0

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

func (*Mock) ExecXSys added in v1.15.0

func (exe *Mock) ExecXSys(exePath string, args []string) error

func (*Mock) GoBuild added in v1.15.0

func (exe *Mock) GoBuild(ctx context.Context, exePath, src, exeDir string) (int, error)

func (*Mock) GoInstall added in v1.15.0

func (exe *Mock) GoInstall(ctx context.Context, path, gobin string) (int, error)

Jump to

Keyboard shortcuts

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