Files
container/sampler/sort_helpers.go
T

13 lines
276 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package sampler
import "slices"
func sortByCompare[T interface{ Compare(T) int }](s []T) {
slices.SortFunc(s, func(a, b T) int {
return a.Compare(b)
})
}