Documentation ¶
Index ¶
- func DoesDirectoryExist(dirPath string) (bool, error)
- func DoesFileExist(filePath string) (bool, error)
- func DoesStringArrayContain(strings []string, targetString string) bool
- func GetSubdirectories(dirPath string) (result []string, err error)
- func MakeDirectory(dir string) error
- func Merge(map1 map[string]string, map2 map[string]string)
- func MoveDirectory(srcPath, destPath string) error
- func ParseCommand(command string) ([]string, error)
- func PrintCommandFooter(writer io.Writer, elapsedTime fmt.Stringer)
- func PrintCommandHeader(writer io.Writer, text, dir string, env []string)
- func PrintSectionHeader(writer io.Writer, text string)
- func PrintSectionHeaderf(writer io.Writer, format string, a ...interface{})
- func Run(dir string, commandWords ...string) (string, error)
- func RunAndPipe(dir string, env []string, writer io.Writer, commandWords ...string) error
- func RunSeries(dir string, commands [][]string) error
- func StringifyKeysMapValue(v interface{}) interface{}
- func ToSnake(in string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoesDirectoryExist ¶
DoesDirectoryExist returns true if the directory dirPath is an existing directory, and false otherwise
func DoesFileExist ¶
DoesFileExist returns true if the file filePath exists, and false otherwise
func DoesStringArrayContain ¶
DoesStringArrayContain returns whether the given string slice contains the given string.
func GetSubdirectories ¶
GetSubdirectories returns a slice of subdirectories in the directory dirPath
func MakeDirectory ¶ added in v0.29.0
MakeDirectory creates a directory dir if it doesn't already exist, returns an error if any
func MoveDirectory ¶
MoveDirectory moves srcPath to destPath
func ParseCommand ¶
ParseCommand parses the command string into a string array
func PrintCommandFooter ¶ added in v0.29.0
PrintCommandFooter prints the time elapsed since startTime
func PrintCommandHeader ¶ added in v0.29.0
PrintCommandHeader prints a command header
func PrintSectionHeader ¶ added in v0.29.0
PrintSectionHeader prints a section header
func PrintSectionHeaderf ¶ added in v0.29.0
PrintSectionHeaderf prints a section header with given format
func Run ¶
Run runs the given command, waits for the process to finish and returns the output string and error (if any)
func RunAndPipe ¶ added in v0.29.0
RunAndPipe runs the given command, and logs the process to the given writer
func StringifyKeysMapValue ¶ added in v0.33.0
func StringifyKeysMapValue(v interface{}) interface{}
StringifyKeysMapValue recurses into v 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:
Types ¶
This section is empty.