exe

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(log logr.Logger, options *Opt, stdin string, cmd string, args ...string) (stdout, stderr string, err error)

Run executes 'cmd' with 'stdin', 'args' and (optional) 'options'. Return stdout and stderr upon completion.

func RunAsync

func RunAsync(ctx context.Context, log logr.Logger, options *Opt, _ string, cmd string, args ...string) *exec.Cmd

RunAsync returns an exec.Cmd that requires Start() and Wait() to run it.

Types

type Opt

type Opt struct {
	// RepoDir is the working directory.
	Dir string
	// Env is the execution environment.
	Env []string
}

Opt are the exec options, see https://godoc.org/os/exec#Cmd for details.

Jump to

Keyboard shortcuts

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