Documentation ¶
Index ¶
- func Coalesce(values ...string) string
- func ConfigureInteractiveLogging(level logging.Level)
- func ConfigureStandardLogging(level logging.Level)
- func ConfigureStandardLoggingLevel(level logging.Level)
- func ConvertToLoggingLevel(verbose bool) logging.Level
- func CopyDir(src string, dst string) (err error)
- func CopyFile(src, dst string) (err error)
- func Join(separator string, values ...string) string
- func LaunchBrowser(url string)
- func MeasureElapsed(msg string, fn func())
- func ParseIntFromSlug(slug string, index int) (int, bool)
- func ParseIntFromString(data string) int
- func ParseTimeFromString(str string) time.Time
- type FileIgnorer
- type LogReader
- type Stopwatch
- type UniqueLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureInteractiveLogging ¶
ConfigureInteractiveLogging - logging
func ConfigureStandardLogging ¶
ConfigureStandardLogging - verbose
func ConfigureStandardLoggingLevel ¶
ConfigureStandardLoggingLevel - logging
func ConvertToLoggingLevel ¶
ConvertToLoggingLevel - convert to
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
func MeasureElapsed ¶
func MeasureElapsed(msg string, fn func())
MeasureElapsed - measure the time taken to complete the function
func ParseIntFromSlug ¶
ParseIntFromSlug - return the index from a slug
func ParseIntFromString ¶
ParseIntFromString - return a int where possible
func ParseTimeFromString ¶
ParseTimeFromString attempts to parse the string value into a time.Time struct
Types ¶
type FileIgnorer ¶
type FileIgnorer struct {
// contains filtered or unexported fields
}
FileIgnorer allows specifying groups of files to be ignored based on Glob or prefix file path matching.
func NewFileIgnorer ¶
func NewFileIgnorer(root string, patterns []string) FileIgnorer
NewFileIgnorer creates a new FileIgnorer and sets the correct paths
func (FileIgnorer) IsIgnored ¶
func (fm FileIgnorer) IsIgnored(path string) bool
IsIgnored returns whether the specified path should be ignored based on the matching the current patterns.
type Stopwatch ¶
type Stopwatch struct {
// contains filtered or unexported fields
}
Stopwatch - track a stop watch
func NewStopwatchLevel ¶
NewStopwatchLevel - start a stop watch with a level
func NewStopwatchf ¶
NewStopwatchf - start a stop watch with formatting
type UniqueLogger ¶
type UniqueLogger struct {
// contains filtered or unexported fields
}
UniqueLogger - logs only the unique errors
func ConfigureSyncLogging ¶
func ConfigureSyncLogging(level logging.Level) *UniqueLogger
ConfigureSyncLogging - logging only to the unique logger
func ConfigureWatchedLogging ¶
func ConfigureWatchedLogging(level logging.Level) *UniqueLogger
ConfigureWatchedLogging - logging to stdout + the unique logger
func NewUniqueLogger ¶
func NewUniqueLogger(level logging.Level) *UniqueLogger
NewUniqueLogger - creates a new unique logger