Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecAt

func ExecAt(cmd *exec.Cmd, path string) ([]byte, error)

    ExecAt runs the given Cmd with is working directory set to path.

    func FileExists

    func FileExists(path string, dir bool) (bool, error)

      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

      func FindFile(fileName string, dir bool) (string, error)

        FindFile recursively searches upwards from the current directory to the filesystem root for the specified file.

        func ReplaceLine

        func ReplaceLine(path, linePrefix, replacement string) error

          ReplaceLine replaces any line in the file at the given path that begins with linePrefix with the given replacement string.

          func WriteFile

          func WriteFile(data []byte, path string, appendTo bool) error

            WriteFile writes the given bytes to the file at path, creating one if necessary. If appendTo is true, then the data will be prepended to the top of the file.

            func WriteJSON

            func WriteJSON(data interface{}, root, dir, name string) error

              WriteJSON marshals the given data as JSON and writes it to the specified location.

              Types

              This section is empty.

              Source Files