1 package emperror 2 3 // HandlerFunc wraps a function and turns it into an error handler. 4 type HandlerFunc func(err error) 5 6 // Handle calls the underlying log function. 7 func (h HandlerFunc) Handle(err error) { 8 h(err) 9 } 10
View as plain text