sheet-historical-data-conve.../utility/helper.go

19 lines
326 B
Go

package utility
import (
"gullion/currency_convert_ssheets/models"
"sort"
)
func GetSortedKeysListBKMRecords(haspMap map[int][]models.BKMRecord ) []int{
keys := make([]int, 0)
for k, _ := range haspMap {
keys = append(keys, k)
}
sort.Slice(keys, func(i, j int) bool {
return keys[i] > keys[j]
})
return keys
}