Documentation

Overview

Package system provide system level operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGoBinary

func BuildGoBinary(serviceName string,
	executableOutput string,
	useCGO bool,
	buildID string,
	userSuppliedBuildTags string,
	linkFlags string,
	noop bool,
	logger *logrus.Logger) error

BuildGoBinary is a helper to build a go binary with the given options

func GoPath

func GoPath() string

GoPath returns either $GOPATH or the new $HOME/go path introduced with Go 1.8

func GoVersion

func GoVersion(logger *logrus.Logger) (string, error)

GoVersion returns the configured go version for this system

func RunAndCaptureOSCommand

func RunAndCaptureOSCommand(cmd *exec.Cmd,
	stdoutWriter io.Writer,
	stderrWriter io.Writer,
	logger *logrus.Logger) error

RunAndCaptureOSCommand runs the given command and captures the stdout and stderr

func RunOSCommand

func RunOSCommand(cmd *exec.Cmd, logger *logrus.Logger) error

RunOSCommand properly executes a system command and writes the output to the provided logger

func TemporaryFile

func TemporaryFile(scratchDir string, name string) (*os.File, error)

TemporaryFile creates a stable temporary filename in the current working directory

Types

This section is empty.