From d5f8a6f81238e9fabb99cb6abfd0bdd761775772 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 6 Dec 2022 09:16:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/home.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/home.go b/routers/home.go index 092b30fe3..c676f51ad 100755 --- a/routers/home.go +++ b/routers/home.go @@ -8,6 +8,7 @@ package routers import ( "bytes" "encoding/json" + "fmt" "net/http" "strconv" "strings" @@ -754,11 +755,13 @@ func GetRankUser(index string) ([]map[string]interface{}, error) { } resultOrg := make([]map[string]interface{}, 0) for _, userRank := range result { + log.Info("userRank" + userRank) tmpIndex := strings.Index(userRank, " ") userName := userRank score := 0 label := "" if tmpIndex != -1 { + log.Info("len=" + fmt.Sprint(len(userRank)) + " index=" + fmt.Sprint(tmpIndex)) userName = userRank[0:tmpIndex] left := userRank[tmpIndex+1:] tmpIndex1 := strings.Index(left, " ")