bilibili-backup/app/service/main/dapper-query/model/rank.go

19 lines
300 B
Go
Raw Normal View History

2019-04-22 10:59:20 +08:00
package model
import (
"sort"
)
// MeanOperationNameValue .
type MeanOperationNameValue struct {
Tag map[string]string
Value float64
}
// SortRank Desc
func SortRank(values []MeanOperationNameValue) {
sort.Slice(values, func(i, j int) bool {
return values[i].Value > values[j].Value
})
}