@@ -185,7 +185,7 @@ func searchKeys(data []byte, keys ...string) int {
185
185
var valueOffset int
186
186
187
187
ArrayEach (data [i :], func (value []byte , dataType ValueType , offset int , err error ) {
188
- if ( curIdx == aIdx ) {
188
+ if curIdx == aIdx {
189
189
valueFound = value
190
190
valueOffset = offset
191
191
}
@@ -344,7 +344,7 @@ func EachKey(data []byte, cb func(int, []byte, ValueType, error), paths ...[]str
344
344
continue
345
345
}
346
346
347
- aIdx , _ := strconv .Atoi (p [level ][1 : len (p [level ]) - 1 ])
347
+ aIdx , _ := strconv .Atoi (p [level ][1 : len (p [level ])- 1 ])
348
348
arrIdxFlags |= bitwiseFlags [aIdx + 1 ]
349
349
pIdxFlags |= bitwiseFlags [pi + 1 ]
350
350
}
@@ -354,10 +354,10 @@ func EachKey(data []byte, cb func(int, []byte, ValueType, error), paths ...[]str
354
354
355
355
var curIdx int
356
356
arrOff , _ := ArrayEach (data [i :], func (value []byte , dataType ValueType , offset int , err error ) {
357
- if ( arrIdxFlags & bitwiseFlags [curIdx + 1 ] != 0 ) {
357
+ if arrIdxFlags & bitwiseFlags [curIdx + 1 ] != 0 {
358
358
for pi , p := range paths {
359
359
if pIdxFlags & bitwiseFlags [pi + 1 ] != 0 {
360
- aIdx , _ := strconv .Atoi (p [level - 1 ][1 : len (p [level - 1 ]) - 1 ])
360
+ aIdx , _ := strconv .Atoi (p [level - 1 ][1 : len (p [level - 1 ])- 1 ])
361
361
362
362
if curIdx == aIdx {
363
363
of := searchKeys (value , p [level :]... )
@@ -594,7 +594,7 @@ func ArrayEach(data []byte, cb func(value []byte, dataType ValueType, offset int
594
594
}
595
595
596
596
if t != NotExist {
597
- cb (v , t , offset + o - len (v ), e )
597
+ cb (v , t , offset + o - len (v ), e )
598
598
}
599
599
600
600
if e != nil {
0 commit comments