Documentation ¶
Index ¶
- func ExecAt(cmd *exec.Cmd, path string) ([]byte, error)
- func FileExists(path string, dir bool) (bool, error)
- func FindFile(fileName string, dir bool) (string, error)
- func ReplaceLine(filename, linePrefix, replacement string) (err error)
- func WriteFile(data []byte, path string, appendTo bool) error
- func WriteJSON(data interface{}, root, dir, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
FileExists returns whether or not a file exists at the specified path. If dir is true, FileExists checks for the existence of the specified directory.
func FindFile ¶
FindFile recursively searches upwards from the current directory to the filesystem root for the specified file.
func ReplaceLine ¶
ReplaceLine replaces any line in the file at the given filename that begins with linePrefix with the given replacement string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.