utils

package
v0.0.0-...-a81022f Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src, dst string) error

Copy will copy a file from src to dst

func FileContains

func FileContains(file, text string) (bool, error)

FileContains checks whether a file contains a string

func FileGetContents

func FileGetContents(inFile string) (string, error)

FileGetContents will get the content of a file, stripping out the source map (if set)

func IsDir

func IsDir(path string) bool

IsDir returns whether a path is a directory

func IsFile

func IsFile(path string) bool

IsFile returns whether a path is a file

func PrettyPrint

func PrettyPrint(i interface{})

PrettyPrint for debugging

Types

type StopWatch

type StopWatch struct {
	StartTime time.Time
}

StopWatch struct

func StartTimer

func StartTimer() StopWatch

StartTimer starts the timer

func (StopWatch) Elapsed

func (o StopWatch) Elapsed() string

Elapsed returns the elapsed time from the StartTimer()

Jump to

Keyboard shortcuts

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