diff --git a/events.go b/events.go index 177bbb4..6627f89 100644 --- a/events.go +++ b/events.go @@ -221,6 +221,13 @@ func findMatch(mux map[string]func(Event), path string) string { return pattern } +// Remove all existing defined Handlers from the map +func (es *EvtStream) ResetHandlers() { + for Path, _ := range es.Handlers { + delete(es.Handlers, Path) + } + return +} func (es *EvtStream) match(path string) string { return findMatch(es.Handlers, path)