1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-11-24 08:22:25 +02:00

Use slices instead of sort pkg (#4992)

Co-authored-by: Robert Pająk <pellared@hotmail.com>
This commit is contained in:
Tyler Yahn 2024-02-29 13:03:36 -08:00 committed by GitHub
parent ec8e6ea61f
commit a7034da631
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,7 @@ package baggage
import (
"fmt"
"math/rand"
"sort"
"slices"
"strings"
"testing"
@ -611,11 +611,11 @@ func TestBaggageString(t *testing.T) {
for i, m := range members {
parts := strings.Split(m, propertyDelimiter)
if len(parts) > 1 {
sort.Strings(parts[1:])
slices.Sort(parts[1:])
members[i] = strings.Join(parts, propertyDelimiter)
}
}
sort.Strings(members)
slices.Sort(members)
return strings.Join(members, listDelimiter)
}