style: linker

This commit is contained in:
songzhibin97
2021-12-06 12:44:26 +08:00
parent 2b9365da17
commit 0fe4750991
95 changed files with 208 additions and 235 deletions
+1 -3
View File
@@ -48,10 +48,8 @@ func DefaultCheckOrMark(key string, expire int, limit int) (err error) {
}
if err = SetLimitWithTime(key, limit, time.Duration(expire)*time.Second); err != nil {
global.GVA_LOG.Error("limit", zap.Error(err))
}
return err
}
func DefaultLimit() gin.HandlerFunc {
@@ -76,7 +74,7 @@ func SetLimitWithTime(key string, limit int, expiration time.Duration) error {
_, err = pipe.Exec(context.Background())
return err
} else {
//次数
// 次数
if times, err := global.GVA_REDIS.Get(context.Background(), key).Int(); err != nil {
return err
} else {