system

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package system provide system level operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGoBinary added in v1.8.0

func BuildGoBinary(serviceName string,
	executableOutput string,
	useCGO bool,
	buildID string,
	buildTags 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 added in v1.9.0

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 added in v1.8.0

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.

Jump to

Keyboard shortcuts

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