From c3225a79aad1ae70c5291bf545fe6acf08a658d3 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 5 Dec 2021 22:39:14 +0800 Subject: [PATCH] sort slice --- bot.go | 2 ++ version.go | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bot.go b/bot.go index 4f938ee..99d9bf1 100644 --- a/bot.go +++ b/bot.go @@ -7,6 +7,7 @@ import ( "fmt" "math" "regexp" + "sort" "strconv" "time" @@ -929,6 +930,7 @@ func botGraphValue(m *tb.Message) { } vals[coID] = append(vals[coID], pt) } + sort.Slice(vals[coID], func(i, j int) bool { return vals[coID][i].X < vals[coID][j].X }) } } diff --git a/version.go b/version.go index 601f118..6e931a0 100644 --- a/version.go +++ b/version.go @@ -1,6 +1,6 @@ // Code generated by version.sh (@generated) DO NOT EDIT. package main -var githash = "4a5b820" -var buildstamp = "2021-12-05_14:10:58" -var commits = "231" -var version = "4a5b820-b231 - 2021-12-05_14:10:58" +var githash = "365c8a9" +var buildstamp = "2021-12-05_14:39:05" +var commits = "232" +var version = "365c8a9-b232 - 2021-12-05_14:39:05"