Skip to content

Commit

Permalink
Merge pull request #14 from ldlPlus/feature/6
Browse files Browse the repository at this point in the history
FIXBUG IN ARRAY
  • Loading branch information
skyhackvip authored Feb 7, 2023
2 parents 0d0f63d + 52f757a commit ec1dc78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/operator/array_op.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package operator

//jundge val in arr
// jundge val in arr
func InArray(arr []interface{}, val interface{}) bool {
if len(arr) == 0 {
return false
}
for _, v := range arr {
if ok, err := Compare("EQ", v, val); err != nil && ok {
if ok, err := Compare("EQ", v, val); err == nil && ok {
return true
}
}
return false
}

//jundge array A in Array B
// jundge array A in Array B
func AInB(a []interface{}, b []interface{}) bool {
if len(b) == 0 {
return false
Expand Down

0 comments on commit ec1dc78

Please sign in to comment.