mirror of
https://github.com/Xevion/glance.git
synced 2025-12-15 06:11:59 -06:00
Add Markets sort-by: change to sort by percent change
This commit is contained in:
@@ -133,6 +133,12 @@ func (t Markets) SortByAbsChange() {
|
||||
})
|
||||
}
|
||||
|
||||
func (t Markets) SortByChange() {
|
||||
sort.Slice(t, func(i, j int) bool {
|
||||
return t[i].PercentChange > t[j].PercentChange
|
||||
})
|
||||
}
|
||||
|
||||
var weatherCodeTable = map[int]string{
|
||||
0: "Clear Sky",
|
||||
1: "Mainly Clear",
|
||||
|
||||
Reference in New Issue
Block a user