File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ arthurgustin [@arthurgustin](https://github.com/arthurgustin)
32
32
Bas van Dijk [@basvandijk](https://github.com/basvandijk)
33
33
Benjamin Fernandes [@LotharSee](https://github.com/LotharSee)
34
34
Benjamin Zarzycki [@kf6nux](https://github.com/kf6nux)
35
+ bestgopher [@bestgopher](https://github.com/bestgopher)
35
36
Björn Gerdau [@kernle32dll](https://github.com/kernle32dll)
36
37
Boris Popovschi [@Zyqsempai](https://github.com/Zyqsempai)
37
38
Bowei Xu [@vancexu](https://github.com/vancexu)
Original file line number Diff line number Diff line change @@ -691,7 +691,7 @@ func (r *SearchResult) Each(typ reflect.Type) []interface{} {
691
691
if r .Hits == nil || r .Hits .Hits == nil || len (r .Hits .Hits ) == 0 {
692
692
return nil
693
693
}
694
- var slice []interface {}
694
+ slice := make ( []interface {}, 0 , len ( r . Hits . Hits ))
695
695
for _ , hit := range r .Hits .Hits {
696
696
v := reflect .New (typ ).Elem ()
697
697
if hit .Source == nil {
You can’t perform that action at this time.
0 commit comments