mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
feat: leaderboard aggregation functionality
feat: leaderboard ui design
This commit is contained in:
@@ -53,3 +53,10 @@ func ParseUserAgent(ua string) (string, string, error) {
|
||||
}
|
||||
return groups[0][1], groups[0][2], nil
|
||||
}
|
||||
|
||||
func SubSlice[T any](slice []T, from, to uint) []T {
|
||||
if int(to) > len(slice) {
|
||||
to = uint(len(slice))
|
||||
}
|
||||
return slice[from:int(to)]
|
||||
}
|
||||
|
Reference in New Issue
Block a user