preallocating slices (#904)

* preallocated some slices when size is known

* gofmt

* gofmt
This commit is contained in:
Till Knuesting
2019-11-04 10:33:53 +00:00
committed by Asim Aslam
parent 2f3c251b00
commit 24b8d2a315
6 changed files with 8 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ func (e *ekv) Read(keys ...string) ([]*store.Record, error) {
values = append(values, keyval.Kvs...)
}
var records []*store.Record
records := make([]*store.Record, 0, len(values))
for _, kv := range values {
records = append(records, &store.Record{