feat: code cleanup

This commit is contained in:
2026-01-04 12:49:56 +08:00
parent 9f9f62f598
commit ab445203aa
4 changed files with 7 additions and 110 deletions

View File

@@ -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