should omit comparison to bool constant.

This commit is contained in:
Miroslav Šedivý 2020-10-28 20:44:50 +01:00
parent 80430e1ef4
commit d0d3e6b2d2

View File

@ -12,7 +12,7 @@ func ArrayIn(val interface{}, array interface{}) (exists bool, index int) {
case reflect.Slice: case reflect.Slice:
s := reflect.ValueOf(array) s := reflect.ValueOf(array)
for i := 0; i < s.Len(); i++ { for i := 0; i < s.Len(); i++ {
if reflect.DeepEqual(val, s.Index(i).Interface()) == true { if reflect.DeepEqual(val, s.Index(i).Interface()) {
index = i index = i
exists = true exists = true
return return