We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 985e60c + 238d98f commit 0d45f64Copy full SHA for 0d45f64
comparators.go
@@ -114,11 +114,21 @@ func lessThanEqual(a, b interface{}) bool {
114
115
// greaterThan will return true if a > b
116
func greaterThan(a, b interface{}) bool {
117
+ // We need to check the types here because, lessThanEqual will
118
+ // return false if the types do not match.
119
+ if reflect.TypeOf(a) != reflect.TypeOf(b) {
120
+ return false
121
+ }
122
return !lessThanEqual(a, b)
123
}
124
125
// greaterThanEqual will return true if a >= b
126
func greaterThanEqual(a, b interface{}) bool {
127
+ // We need to check the types here because, lessThan will
128
129
130
131
132
return !lessThan(a, b)
133
134
0 commit comments