eventd.go
func (b *Bus) Unsubscribe(h Handler) bool {
	b.mu.Lock()
	defer b.mu.Unlock()

	for i, v := range b.handlers {
		if v == h {
			b.handlers = append(b.handlers[:i], b.handlers[i+1:]...)
			return true
		}
	}

	return false
}
func (b *Bus) Unsubscribe(h Handler) bool {
	b.mu.Lock()
	defer b.mu.Unlock()

	for i, v := range b.handlers {
		if v == h {
			b.handlers = append(b.handlers[:i], b.handlers[i+1:]...)
			return true
		}
	}

	return false
}
func ( b * Bus ) Unsubscribe ( h Handler ) bool { b . mu . Lock ( ) defer b . mu . Unlock ( ) for i , v := range b . handlers { if v == h { b . handlers = append ( b . handlers [ : i ] , b . handlers [ i + 1 : ] ... ) return true } } return false }
// Unsubscribe handler from the bus.
// It will return false if the handler not subscribed.
Unsubscribe handler from the bus . It will return false if the handler not subscribed .