Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckErr ¶
CheckErr checks for error, logs and optionally exits the program
Example (Exit) ¶
// fakeErr := errors.New("Fake error")
// How do we test the output and the os.Exit(1)?"
// CheckErr(fakeErr, "test: %v", "fatal")
Example (Nil) ¶
CheckErr(nil, "test", "fatal")
Example (NoExit) ¶
fakeErr := errors.New("Fake error")
CheckErr(fakeErr, "test: %v", "error")
func GetDurationFromInterval ¶
GetDurationFromInterval takes a formated interval and returns a datetime
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.