1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-04 21:42:57 +02:00

fix prealloc in trace (#1558)

This commit is contained in:
徐旭
2020-04-22 21:10:59 +08:00
committed by GitHub
parent e25ab9f4ca
commit e55c23164a

View File

@ -24,7 +24,7 @@ func (t *Tracer) Read(opts ...trace.ReadOption) ([]*trace.Span, error) {
sp := t.buffer.Get(t.buffer.Size())
var spans []*trace.Span
spans := make([]*trace.Span, 0, len(sp))
for _, span := range sp {
val := span.Value.(*trace.Span)