1. The slice Package If your Go package is anything newer than 1.21, and the items in the slice are of the cmp.Ordered type, you should definitely use the slice.Sort() function. It only works if you intend to sort it in place and in ascending order, though. So if we want to sort something in… Continue reading Sorting a slice in Go easily