gitlab.com/evatix-go/core@v1.3.55/isany/DeepEqualAllItems.go (about)

     1  package isany
     2  
     3  func DeepEqualAllItems(
     4  	items ...interface{},
     5  ) (isAllEqual bool) {
     6  	length := len(items)
     7  
     8  	if length == 0 || length == 1 {
     9  		return true
    10  	}
    11  
    12  	if length == 2 {
    13  		return DeepEqual(items[0], items[1])
    14  	}
    15  
    16  	for i := 1; i < length; i++ {
    17  		first := items[i-1]
    18  		second := items[i]
    19  
    20  		if NotDeepEqual(first, second) {
    21  			return false
    22  		}
    23  	}
    24  
    25  	return true
    26  }