2024-12-27 22:34:43 +01:00
|
|
|
package data
|
|
|
|
|
|
2025-01-02 15:27:53 +01:00
|
|
|
// Defines a Weight function that determines a order on type T. As an example
|
|
|
|
|
// this may be used to sort article by date or filter for a search term.
|
2025-01-01 23:28:12 +01:00
|
|
|
type ISortCriteria[T any] interface {
|
|
|
|
|
Weight(t T) int
|
2024-12-27 22:34:43 +01:00
|
|
|
}
|