MCPcopy
hub / github.com/grafana/tempo / extendReuseSlice

Function extendReuseSlice

tempodb/encoding/vparquet3/schema.go:746–755  ·  view source on GitHub ↗
(sz int, in []T)

Source from the content-addressed store, hash-verified

744}
745
746func extendReuseSlice[T any](sz int, in []T) []T {
747 if cap(in) >= sz {
748 // slice is large enough
749 return in[:sz]
750 }
751
752 out := make([]T, sz)
753 copy(out, in)
754 return out
755}

Callers 4

traceToParquetFunction · 0.70
eventToParquetFunction · 0.70
TestExtendReuseSliceFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestExtendReuseSliceFunction · 0.56