File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,21 @@ func lessThanEqual(a, b interface{}) bool {
114
114
115
115
// greaterThan will return true if a > b
116
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
+ }
117
122
return ! lessThanEqual (a , b )
118
123
}
119
124
120
125
// greaterThanEqual will return true if a >= b
121
126
func greaterThanEqual (a , b interface {}) bool {
127
+ // We need to check the types here because, lessThan will
128
+ // return false if the types do not match.
129
+ if reflect .TypeOf (a ) != reflect .TypeOf (b ) {
130
+ return false
131
+ }
122
132
return ! lessThan (a , b )
123
133
}
124
134
You can’t perform that action at this time.
0 commit comments