cmd

package
v0.0.0-...-f384223 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RunCommand            = runCommand
	RunCommands           = runCommands
	RunCommandsInParallel = runCommandsInParallel
)

These vars are defined for easy mocking in unit tests.

Functions

This section is empty.

Types

type CommandLineError

type CommandLineError struct {
	Command     string
	ErrorCode   int
	ErrorOutput []byte
}

CommandLineError is a custom error we use for errors got from running commands

func (CommandLineError) Error

func (c CommandLineError) Error() string

type Option

type Option func(cmd *exec.Cmd)

Option enables further configuration of a Cmd.

func WithDir

func WithDir(dir string) Option

WithDir returns an option that adds dir for the given Cmd.

func WithEnvs

func WithEnvs(envs []string) Option

WithEnvs returns an option that adds env vars for the given Cmd.

Jump to

Keyboard shortcuts

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