mirror of
https://github.com/luxfi/container.git
synced 2026-09-24 00:24:34 +00:00
13 lines
276 B
Go
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)
|
|
})
|
|
}
|