utility

package
v0.0.0-...-ed78c34 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(needle string, haystack []string) bool

func ContainsStringStartingWith

func ContainsStringStartingWith(prefix string, a []string) bool

func CopyAndOverrideDirectory

func CopyAndOverrideDirectory(source, target string)

Copies all files from source to target directory But use with caution: Target directory is overriden completely!

func DecryptFile

func DecryptFile(encryptedPathAndFilename string) string

func DirectoryIsEmpty

func DirectoryIsEmpty(filepath string) bool

func EncryptFile

func EncryptFile(unencryptedPathAndFilename string) string

func ExecCommand

func ExecCommand(commandParts ...string) string

*

  • Execute a command and return the output as string

func ExecCommandAndDumpResultToFile

func ExecCommandAndDumpResultToFile(resultFile string, commandParts ...string)

func ExecCommandAndFailWithFatalErrorOnError

func ExecCommandAndFailWithFatalErrorOnError(commandParts ...string)

func ExecCommandWithStdIn

func ExecCommandWithStdIn(stdin io.Reader, commandParts ...string) string

func FileExists

func FileExists(filepath string) bool

func Log

func Log(message string)

func LogCouldNotExecuteCommand

func LogCouldNotExecuteCommand(reasons []string)

func ParseTable

func ParseTable(table string) (rows [][]string, err error)

func RenderAsTable

func RenderAsTable(header []string, rows [][]string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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