made it so that the Route() methods, of the various routers, will return an error if the receiver is nil. (except for the discard router.)

master
Charles Iliya Krempeaux 2016-09-20 11:10:43 -07:00
parent 4afa358cf7
commit 55ae1a2fe6
1 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,9 @@ func New(router Router, cascade ...interface{}) Flogger {
func (flogger *internalFlogger) route(message string, moreContext map[string]interface{}) error { func (flogger *internalFlogger) route(message string, moreContext map[string]interface{}) error {
if nil == flogger {
return errNilReceiver
}
context := newContext(flogger.context, moreContext) context := newContext(flogger.context, moreContext)