@@ -397,7 +397,7 @@ func (r *findResult[T]) every(current reflect.Value, path []int, v T, f func(ref
397397 switch current .Kind () {
398398 case reflect .Struct :
399399 r .every (current .Field (path [0 ]), path [1 :], v , f )
400- case reflect .Slice :
400+ case reflect .Slice , reflect . Array :
401401 for j := 0 ; j < current .Len (); j ++ {
402402 r .every (current .Index (j ), path , v , f )
403403 }
@@ -432,7 +432,7 @@ func jsonName(field reflect.StructField) string {
432432// PathBuffer, and applying a function to leaf nodes.
433433func (r * findResult [T ]) everyPB (current reflect.Value , path []int , pb * PathBuffer , v T , f func (reflect.Value , T )) {
434434 switch reflect .Indirect (current ).Kind () {
435- case reflect .Slice , reflect .Map :
435+ case reflect .Slice , reflect .Array , reflect . Map :
436436 // Ignore these. We only care about the leaf nodes.
437437 default :
438438 if len (path ) == 0 {
@@ -480,7 +480,7 @@ func (r *findResult[T]) everyPB(current reflect.Value, path []int, pb *PathBuffe
480480 for i := 0 ; i < pops ; i ++ {
481481 pb .Pop ()
482482 }
483- case reflect .Slice :
483+ case reflect .Slice , reflect . Array :
484484 for j := 0 ; j < current .Len (); j ++ {
485485 pb .PushIndex (j )
486486 r .everyPB (current .Index (j ), path , pb , v , f )
@@ -566,7 +566,7 @@ func _findInType[T comparable](t reflect.Type, path []int, result *findResult[T]
566566 delete (visited , t )
567567 }
568568 }
569- case reflect .Slice :
569+ case reflect .Slice , reflect . Array :
570570 _findInType [T ](t .Elem (), path , result , onType , onField , recurseFields , visited , ignore ... )
571571 case reflect .Map :
572572 _findInType [T ](t .Elem (), path , result , onType , onField , recurseFields , visited , ignore ... )
0 commit comments