func (es eventStore) Clean() {
	es.m.Lock()
	defer es.m.Unlock()
	for k, v := range es.eb {
		if time.Now().Sub(v.Expiration) > 0 {
			delete(es.eb, k)
		}
	}
}
// Clean will remove event listings from the map that have exceeded time limit
//
// DO NOT CALL THIS RANDOMLY!!
//
// This should only be called in the goroutine in main (ticker to check expiration)
Clean will remove event listings from the map that have exceeded time limit

DO NOT CALL THIS RANDOMLY

This should only be called in the goroutine in main (ticker to check expiration)
// Clean will remove event listings from the map that have exceeded time limit // // DO NOT CALL THIS RANDOMLY!! // // This should only be called in the goroutine in main ( ticker to check expiration )
func (es eventStore) Clean() {
	es.m.Lock()
	defer es.m.Unlock()
	for k, v := range es.eb {
		if time.Now().Sub(v.Expiration) > 0 {
			delete(es.eb, k)
		}
	}
}
func ( es eventStore ) Clean ( ) { es . m . Lock ( ) defer es . m . Unlock ( ) for k , v := range es . eb { if time . Now ( ) . Sub ( v . Expiration ) > 0 { delete ( es . eb , k ) } } }
Clean will remove event listings from the map that have exceeded time limit
Clean will remove event listings from the map that have exceeded time limit