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:
parent
ec8e6ea61f
commit
a7034da631
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user