// Deletes a topic from the slice
Deletes a topic from the slice
// Deletes a topic from the slice
func (sub subscription) delete(topic string) bool {
	index := sub.indexOf(topic)
	if index == -1 {
		return false
	}
	topics := make([]string, len(sub.topics)-1)
	copy(topics[:index], sub.topics[:index])
	copy(topics[index:], sub.topics[index+1:])
	sub.topics = topics
	return true
}
func ( sub subscription ) delete ( topic string ) bool { index := sub . indexOf ( topic ) if index == - 1 { return false } topics := make ( [ ] string , len ( sub . topics ) - 1 ) copy ( topics [ : index ] , sub . topics [ : index ] ) copy ( topics [ index : ] , sub . topics [ index + 1 : ] ) sub . topics = topics return true }
Deletes a topic from the slice
Deletes a topic from the slice