diff --git a/pkg/collection/map_test.go b/pkg/collection/map_test.go index 98175e5..e6812f6 100644 --- a/pkg/collection/map_test.go +++ b/pkg/collection/map_test.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/json" "fmt" - "slices" + "sort" "testing" "github.com/stretchr/testify/require" @@ -23,7 +23,7 @@ func ExampleMap() { result = append(result, fmt.Sprintf("%d=%d", key, value)) } // Iteration order is not guaranteed - slices.Sort(result) + sort.Strings(result) fmt.Println(result) // Output: [0=0 1=1] } diff --git a/pkg/collection/set_test.go b/pkg/collection/set_test.go index 91ba54d..635ed0b 100644 --- a/pkg/collection/set_test.go +++ b/pkg/collection/set_test.go @@ -3,7 +3,7 @@ package collection import ( "encoding/json" "fmt" - "slices" + "sort" "testing" "github.com/stretchr/testify/require" @@ -22,7 +22,7 @@ func ExampleSet() { result = append(result, value) } // Iteration order is not guaranteed - slices.Sort(result) + sort.Ints(result) fmt.Println(result) // Output: [0 1] }