Documentation
¶
Index ¶
Constants ¶
View Source
const ( PRINT = iota LOG LOG_EXIT PANIC NOTHING )
Variables ¶
View Source
var (
DEFAULT = PANIC
)
Functions ¶
func HandleError ¶
ErrorHandler is a function that handles errors to reduce if-else statements in code. It accepts an error pointer and an optional action. The action can be a function that accepts an error, a function that accepts an error pointer, a function that accepts no arguments, or a numeric value.
Parameters:
- err: *error
- action: interface{}
Returns:
- error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.