executils

package
v0.0.0-...-17c0c07 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2015 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Utilities for invoking exec. Mainly focused on 'go build' and cross-compilation

Index

Constants

This section is empty.

Variables

View Source
var (
	BUILD_COMMANDS = []string{"build", "install"}
)

Functions

func CgoEnabled

func CgoEnabled(goos, arch string) string

check if cgoEnabled is required. 0.2.4 refactored this out TODO not needed for go1.1+. Remove this once go1.0 reaches end of life. (when is that?)

func CombineActualEnv

func CombineActualEnv(env []string, isVeryVerbose bool) []string

func InvokeGo

func InvokeGo(workingDirectory string, subCmd string, subCmdArgs []string, env []string, settings *config.Settings) error

invoke the go command via the os/exec package 0.3.1 v0.9 changed signature

func NewCmd

func NewCmd(cmdPath string, workingDirectory string, args []string, env []string, isVerbose bool, isRedirectToStdout bool) (*exec.Cmd, error)

func PrepareCmd

func PrepareCmd(cmd *exec.Cmd, workingDirectory string, args []string, env []string, isVeryVerbose bool) error

func PrintableArgs

func PrintableArgs(args []string) string

returns a list of printable args

func RedirectIO

func RedirectIO(cmd *exec.Cmd)

func RedirectIOTo

func RedirectIOTo(cmd *exec.Cmd, myin io.Reader, myout, myerr io.Writer)

func StartAndWait

func StartAndWait(cmd *exec.Cmd) error

StartAndWait starts the given command and waits for it to exit. If the command started successfully but exited with an error, any output to stderr is included in the error message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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