Skip to content

Commit ef2377c

Browse files
committed
fixed lint issues
1 parent e0e9688 commit ef2377c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

middleware/rate_limiter.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type (
2525
}
2626
)
2727

28+
// DefaultRateLimiterConfig defines default values for RateLimiterConfig
2829
var DefaultRateLimiterConfig = RateLimiterConfig{
2930
Skipper: DefaultSkipper,
3031
}
@@ -63,9 +64,8 @@ func RateLimiterWithConfig(config RateLimiterConfig) echo.MiddlewareFunc {
6364
allowed := config.Store.ShouldAllow(identifier)
6465
if !allowed {
6566
return c.JSON(http.StatusTooManyRequests, nil)
66-
} else {
67-
return next(c)
6867
}
68+
return next(c)
6969
}
7070
}
7171
}
@@ -78,7 +78,7 @@ type InMemoryStore struct {
7878
burst int
7979
}
8080

81-
// implements TokenStore.ShouldAllow
81+
// ShouldAllow implements TokenStore.ShouldAllow
8282
func (store *InMemoryStore) ShouldAllow(identifier string) bool {
8383
store.mutex.Lock()
8484
defer store.mutex.Unlock()

0 commit comments

Comments
 (0)