cmd

package
v0.0.0-...-62801f1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommand

func RunCommand(cmdLine string) (string, error)

RunCommand will run the command and return the standard output, plus error if there is one.

func RunCommands

func RunCommands(cmdLines ...string) (string, error)

RunCommands will run the commands sequentially. If there is an error when running a command, it will return directly with all standard output so far and the error.

func RunCommandsInParallel

func RunCommandsInParallel(cmdLines ...string) (string, error)

RunCommandsInParallel will run the commands in parallel. It will always finish running all commands, and return all standard output and errors together.

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

Jump to

Keyboard shortcuts

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