Documentation ¶
Index ¶
- Variables
- func AbsPath(path string) string
- func CopyDirectory(sourceDirectory, destinationDirectory string) error
- func CopyFile(sourceFile, destinationFile string) error
- func ExecCommand(command string, args []string, redirect bool) string
- func ExecutableExists(executableName string) bool
- func GetFiles(path string, recursive bool) ([]string, error)
- func GetFilesContains(path, substring string) ([]string, error)
- func GetFilesContainsRecursive(path, substring string) ([]string, error)
- func InputMessage(message string) string
- func IsDir(path string) bool
- func OutputStatus(status bool, message string)
- func Sha512Sum(content string, rounds int) string
- func WriteOrUpdateFile(file string, fileContent []byte, sourceFileMode os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
var GlobalFileMode os.FileMode
GlobalFileMode is a file mode we'll use for global IO operations.
var NonGlobalFileMode os.FileMode
NonGlobalFileMode is the file mode we'll use for non-global IO operations.
Functions ¶
func AbsPath ¶
AbsPath get the absolute directory path, cleaning out any file names, home directory references, etc.
func CopyDirectory ¶
CopyDirectory will the directory specified and its contents into the destination directory
func ExecCommand ¶
ExecCommand executes a command with args and returning the stringified output
func ExecutableExists ¶
ExecutableExists checks if an executable exists
func GetFilesContains ¶
GetFilesContains will return any files from a directory containing a particular string
func GetFilesContainsRecursive ¶
GetFilesContainsRecursive will return any files from a directory containing a particular string, recursively
func InputMessage ¶
InputMessage fetches input after message
func OutputStatus ¶
OutputStatus outputs a "check" or not check based on true / false status, along with the message
Types ¶
This section is empty.