// FindMany will return as many messages
// in which all of the filters match true.
// If no messages match all the filters
// we will return an empty []proto.Message.
FindMany will return as many messages
in which all of the filters match true.
If no messages match all the filters
we will return an empty []proto.Message.
// FindMany will return as many messages // in which all of the filters match true . // If no messages match all the filters // we will return an empty [] proto . Message .
func (messages Messages) FindMany(filters ...Filter) Messages {
	matches := Messages{}
loop:
	for _, message := range messages {
		for _, filter := range filters {
			if !filter(message) {
				continue loop
			}
		}
		matches = append(matches, message)
	}
	return matches
}
func ( messages Messages ) FindMany ( filters ... Filter ) Messages { matches := Messages { } loop : for _ , message := range messages { for _ , filter := range filters { if ! filter ( message ) { continue loop } } matches = append ( matches , message ) } return matches }
FindMany will return as many messages
in which all of the filters match true.
FindMany will return as many messages in which all of the filters match true .