Documentation ¶
Index ¶
- func BashCmdExec(cmd string, workingDir string, environ []string, logPrefix string) error
- func CmdExec(cmdName string, cmdArgs []string, workingDir string, environ []string, ...) error
- func CopyDir(src string, dst string) (err error)
- func CopyFile(src, dst string) (err error)
- func ExpandPath(filePath string) (string, error)
- func FileDelete(filePath string) error
- func FileExists(filePath string) bool
- func FileWrite(filePath string, content string, perm os.FileMode) error
- func LeftPad(s string, padStr string, pLen int) string
- func LeftPad2Len(s string, padStr string, overallLen int) string
- func MapKeys(m map[string]interface{}) []string
- func PopulateTemplate(tmplContent string, data map[string]interface{}) (string, error)
- func RightPad(s string, padStr string, pLen int) string
- func RightPad2Len(s string, padStr string, overallLen int) string
- func SnakeCaseToCamelCase(inputUnderScoreStr string) (camelCase string)
- func StdinQuery(question string) string
- func StringInSlice(slice []string, item string) bool
- func StringifyYAMLMapKeys(in interface{}) interface{}
- func StripIndent(multilineStr string) string
- func UniquePort(data map[string]interface{}) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BashCmdExec ¶
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
func ExpandPath ¶
func FileDelete ¶ added in v1.0.5
func FileExists ¶
func PopulateTemplate ¶
func SnakeCaseToCamelCase ¶
func StdinQuery ¶ added in v1.0.4
func StringInSlice ¶
func StringifyYAMLMapKeys ¶
func StringifyYAMLMapKeys(in interface{}) interface{}
stringifyKeysMapValue recurses into in and changes all instances of map[interface{}]interface{} to map[string]interface{}. This is useful to work around the impedence mismatch between JSON and YAML unmarshaling that's described here: https://github.com/go-yaml/yaml/issues/139
Inspired by https://github.com/stripe/stripe-mock, MIT licensed
func StripIndent ¶
func UniquePort ¶
Types ¶
This section is empty.