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, dryRun bool) error
- func LeftPad(s string, padStr string, pLen int) string
- func LeftPad2Len(s string, padStr string, overallLen int) string
- func MapDeepCopy(m map[string]interface{}) (map[string]interface{}, error)
- func MapKeys(m map[string]interface{}) []string
- func PopulatePathTemplate(pathTmplContent string, data interface{}) (string, error)
- func PopulateTemplate(tmplContent string, data interface{}) (string, error)
- func RightPad(s string, padStr string, pLen int) string
- func RightPad2Len(s string, padStr string, overallLen int) string
- func SliceIncludes(slice []string, item string) bool
- func SnakeCaseToCamelCase(inputUnderScoreStr string) (camelCase string)
- func StdinQuery(question string) string
- func StdinQueryBoolean(question string) bool
- func StdinQueryInt(question string) (int, error)
- func StdinQueryPassword(question string) (string, error)
- func StringToInt(input string) (int, error)
- func StringifyYAMLMapKeys(in interface{}) interface{}
- func StripIndent(multilineStr string) string
- func UniquePort(data 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 MapDeepCopy ¶ added in v1.0.6
func PopulatePathTemplate ¶ added in v1.0.11
func PopulateTemplate ¶
func SliceIncludes ¶ added in v1.0.9
func SnakeCaseToCamelCase ¶
func StdinQuery ¶ added in v1.0.4
func StdinQueryBoolean ¶ added in v1.0.9
func StdinQueryInt ¶ added in v1.0.10
func StdinQueryPassword ¶ added in v1.0.10
func StringToInt ¶ added in v1.0.10
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.