Skip to content

Commit ea64382

Browse files
authored
Merge branch 'master' into sync-map-solution
2 parents 89fad0f + 8f4d71a commit ea64382

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func NewRateLimiter() *RateLimiter {
6262
}
6363
```
6464

65-
## Fix Current Access with sync.Mutext
65+
## Fix Current Access with sync.Mutex
6666

6767
```golang
6868
// RateLimiterMiddleware - 建立 ratelimiter middleware
@@ -92,6 +92,7 @@ func (r *RateLimiter) RateLimiterMiddleware(next http.Handler, limit rate.Limit,
9292
}
9393
```
9494

95+
9596
## handle concurrency problem with sync.Map
9697

9798
```golang
@@ -117,4 +118,5 @@ func (r *RateLimiter) RateLimiterMiddleware(next http.Handler, limit rate.Limit,
117118
next.ServeHTTP(w, req)
118119
})
119120
}
120-
```
121+
```
122+

0 commit comments

Comments
 (0)