Merge pull request #98 from MrWaggel/patch-1
Added a EvtStream member function ResetHandlers()
This commit is contained in:
commit
a7e3aeef4c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user