gitlab.com/evatix-go/core@v1.3.55/corecmp/AnyItem.go (about)

     1  package corecmp
     2  
     3  import "gitlab.com/evatix-go/core/corecomparator"
     4  
     5  func AnyItem(left, right interface{}) corecomparator.Compare {
     6  	if left == nil && right == nil {
     7  		return corecomparator.Equal
     8  	}
     9  
    10  	if left == nil || right == nil {
    11  		return corecomparator.NotEqual
    12  	}
    13  
    14  	if left == right {
    15  		return corecomparator.Equal
    16  	}
    17  
    18  	return corecomparator.Inconclusive
    19  }