From 8fc2f1a4a39dcc0d73217f30c21d64dd6727e217 Mon Sep 17 00:00:00 2001 From: MartialBE Date: Tue, 21 May 2024 01:37:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20chore:=20Remove=20unnecessary=20?= =?UTF-8?q?print=20statements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/notify/channel/dingTalk.go | 1 - controller/lark.go | 1 - middleware/rate-limit.go | 4 ---- 3 files changed, 6 deletions(-) diff --git a/common/notify/channel/dingTalk.go b/common/notify/channel/dingTalk.go index d20beddf..7c5c5188 100644 --- a/common/notify/channel/dingTalk.go +++ b/common/notify/channel/dingTalk.go @@ -111,7 +111,6 @@ func dingtalkErrFunc(resp *http.Response) *types.OpenAIError { err := json.NewDecoder(resp.Body).Decode(respMsg) if err != nil { - fmt.Println(err) return nil } diff --git a/controller/lark.go b/controller/lark.go index 0a77fc2c..d735d1d8 100644 --- a/controller/lark.go +++ b/controller/lark.go @@ -143,7 +143,6 @@ func getLarkUserInfoByCode(code string) (*LarkUser, error) { if err != nil { return nil, err } - fmt.Println("larkUser", larkUser) return &larkUser, nil } diff --git a/middleware/rate-limit.go b/middleware/rate-limit.go index ef0015ac..41b1aa59 100644 --- a/middleware/rate-limit.go +++ b/middleware/rate-limit.go @@ -2,7 +2,6 @@ package middleware import ( "context" - "fmt" "net/http" "one-api/common" "time" @@ -39,7 +38,6 @@ func redisRateLimiter(c *gin.Context, maxRequestNum int, duration int64, mark st key := "rateLimit:" + mark + c.ClientIP() listLength, err := rdb.LLen(ctx, key).Result() if err != nil { - fmt.Println(err.Error()) c.Status(http.StatusInternalServerError) c.Abort() return @@ -51,7 +49,6 @@ func redisRateLimiter(c *gin.Context, maxRequestNum int, duration int64, mark st oldTimeStr, _ := rdb.LIndex(ctx, key, -1).Result() oldTime, err := time.Parse(timeFormat, oldTimeStr) if err != nil { - fmt.Println(err) c.Status(http.StatusInternalServerError) c.Abort() return @@ -59,7 +56,6 @@ func redisRateLimiter(c *gin.Context, maxRequestNum int, duration int64, mark st nowTimeStr := time.Now().Format(timeFormat) nowTime, err := time.Parse(timeFormat, nowTimeStr) if err != nil { - fmt.Println(err) c.Status(http.StatusInternalServerError) c.Abort() return