util

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = log.New(os.Stdout, "[terragrunt] ", log.LstdFlags)

A simple logger we can use to get consistent log formatting through out the app

Functions

func FileExists

func FileExists(path string) bool

Return true if the given file exists

func GetPathRelativeTo added in v0.4.0

func GetPathRelativeTo(path string, basePath string) (string, error)

Return the relative path you would have to take to get from basePath to path

func Grep

func Grep(regex *regexp.Regexp, glob string) (bool, error)

Returns true if the given regex can be found in any of the files matched by the given glob

func ReadFileAsString added in v0.4.0

func ReadFileAsString(path string) (string, error)

Return the contents of the file at the given path as a string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL