opentelemetry-go
opentelemetry-go copied to clipboard
Replace ensureAttributesCapacity with slices.Grow
Replace ensureAttributesCapacity with slices.Grow once we drop support for Go 1.20.
How about inlining the
slices.Growimplementation instead of referencinggolang.org/x/exp?
Originally posted by @pellared in https://github.com/open-telemetry/opentelemetry-go/pull/4818#discussion_r1446458963
You also will, while you're in the same code, also want to change the if x > y { foo(x) } else { foo(y) } added in #4818 to a min() per go1.21.
@pellared Mind if I take a stab at it ?
@pellared Mind if I take a stab at it ?
go1.22 is not yet out, so go1.20 is still supported. Feel free to prepare, but do not land, a PR that does the cleanup I suggested.