package
Version:
v0.1.12
Opens a new window with list of versions in this module.
Published: Feb 12, 2026
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package score provides utilities for scoring and selecting items based on multiple criteria.
type Scores[T any] []struct {
Item T
Score int
}
Scores holds items with their calculated scores.
func Score[T any](items []T, scorers ...func(T) int) Scores[T]
Score calculates scores for all items using the provided scoring functions.
Top returns all items with the highest score.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.