sort slice

This commit is contained in:
shoopea 2021-12-05 22:39:14 +08:00
parent 365c8a9f91
commit c3225a79aa
2 changed files with 6 additions and 4 deletions

2
bot.go
View File

@ -7,6 +7,7 @@ import (
"fmt" "fmt"
"math" "math"
"regexp" "regexp"
"sort"
"strconv" "strconv"
"time" "time"
@ -929,6 +930,7 @@ func botGraphValue(m *tb.Message) {
} }
vals[coID] = append(vals[coID], pt) vals[coID] = append(vals[coID], pt)
} }
sort.Slice(vals[coID], func(i, j int) bool { return vals[coID][i].X < vals[coID][j].X })
} }
} }

View File

@ -1,6 +1,6 @@
// Code generated by version.sh (@generated) DO NOT EDIT. // Code generated by version.sh (@generated) DO NOT EDIT.
package main package main
var githash = "4a5b820" var githash = "365c8a9"
var buildstamp = "2021-12-05_14:10:58" var buildstamp = "2021-12-05_14:39:05"
var commits = "231" var commits = "232"
var version = "4a5b820-b231 - 2021-12-05_14:10:58" var version = "365c8a9-b232 - 2021-12-05_14:39:05"