Exemplo n.º 1
0
Arquivo: logger.go Projeto: sqp/godock
// GetErr test and logs the error, and return it for later use.
func GetErr(e error, msg string) error {
	if e != nil {
		std.Println(color.Red("Error"), msg, ":", e)
	}
	return e
}
Exemplo n.º 2
0
Arquivo: logger.go Projeto: sqp/godock
// Err test and log the error as Error type. Return true if an error was found.
//
func Err(e error, msg string) (fail bool) {
	return l(e, color.Red("Error"), msg)
}