in pubsub.go [56:80]
func (l listenerMap) remove(channel string, listener Writable) (shouldUnsubscribe bool) {
list := l[channel]
changed := false
for i, other := range list {
if other == listener {
changed = true
list[i] = list[len(list)-1]
list[len(list)-1] = nil
list = list[:len(list)-1]
break
}
}
if !changed {
return false
}
if len(list) == 0 {
delete(l, channel)
return true
}
l[channel] = list
return false
}