zhangyunhao116/pdqsort

How to replace?

ivanjaros opened this issue · 1 comments

Hi, so obviously this was merged into Go std library. But how do I replace pdqsort.Slice now? Go requires less function as argument and I don't see any new functions added to std. So how do i achieve the same functionality?

Hi, it seems like you need to update your Go version to 1.21. In this latest release, the slices package has been merged into the standard library. You can use the slices.Sort(https://pkg.go.dev/slices@master#Sort) to replace the pdqsort.Slice.

https://tip.golang.org/doc/go1.21#slices