feat: code cleanup
This commit is contained in:
@@ -9,10 +9,11 @@ package rate_limit
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.zhangdeman.cn/zhangdeman/rate_limit/define"
|
||||
"golang.org/x/time/rate"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"git.zhangdeman.cn/zhangdeman/rate_limit/define"
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -23,10 +24,6 @@ var (
|
||||
)
|
||||
|
||||
// Memory ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 20:40 2024/6/20
|
||||
type Memory struct {
|
||||
lock *sync.RWMutex
|
||||
limiterTable map[string]*rate.Limiter
|
||||
|
||||
Reference in New Issue
Block a user