-
Notifications
You must be signed in to change notification settings - Fork 6
/
object.go
31 lines (26 loc) · 828 Bytes
/
object.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package equals
func ObjectPointer[T Comparable[T]](left, right *T) bool {
return GenericPointer(left, right, func(left, right T) bool {
return left.Equals(right)
})
}
func ObjectArray[T Comparable[T]](left, right []T) bool {
return GenericArray(left, right, func(left, right T) bool {
return left.Equals(right)
})
}
func ObjectMap[T Comparable[T]](left, right map[string]T) bool {
return GenericMap(left, right, func(left, right T) bool {
return left.Equals(right)
})
}
func ObjectArrayPointer[T Comparable[T]](left, right *[]T) bool {
return GenericArrayPointer(left, right, func(left, right T) bool {
return left.Equals(right)
})
}
func ObjectMapPointer[T Comparable[T]](left, right *map[string]T) bool {
return GenericMapPointer(left, right, func(left, right T) bool {
return left.Equals(right)
})
}