Exemplo n.º 1
0
func overlapsAny(c comment.Comment, existingComments []comment.Comment) bool {
	for _, existing := range existingComments {
		if review_utils.Overlaps(c, existing) {
			return true
		}
	}
	return false
}
Exemplo n.º 2
0
func hasOverlap(newComment comment.Comment, existingComments []review.CommentThread) bool {
	for _, existing := range existingComments {
		if review_utils.Overlaps(newComment, existing.Comment) {
			return true
		} else if hasOverlap(newComment, existing.Children) {
			return true
		}
	}
	return false
}