Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmpBucketSort ¶
CmpBucketSort returns a sorted slice of keys from the given table, sorted by the value returned by the given function. The returned slice is sorted in ascending order of the sorting keys.
The function also supports duplicate keys. If two keys have the same sorting key, they will be sorted in the order they were added to the table.
Parameters:
- table: a map from type to number of protections.
- fn: a function that takes a value from the table and returns an integer that will be used as the sorting key.
Returns:
- []K: a sorted slice of keys from the table.
- error: an error if the function is nil.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.