refactor: clean up code to pass go lint test
This commit is contained in:
@@ -79,7 +79,7 @@ func (jwtAuth JwtAuth) AuthMiddleware(next http.Handler) http.Handler {
|
||||
defer func(Body io.ReadCloser) {
|
||||
err := Body.Close()
|
||||
if err != nil {
|
||||
|
||||
logger.Error("Error closing body: %v", err)
|
||||
}
|
||||
}(authResp.Body)
|
||||
// Inject specific header tp the current request's header
|
||||
|
||||
@@ -26,13 +26,13 @@ import (
|
||||
|
||||
// RateLimiter defines requests limit properties.
|
||||
type RateLimiter struct {
|
||||
requests int
|
||||
id string
|
||||
window time.Duration
|
||||
clientMap map[string]*Client
|
||||
mu sync.Mutex
|
||||
origins []string
|
||||
hosts []string
|
||||
requests int
|
||||
id string
|
||||
window time.Duration
|
||||
clientMap map[string]*Client
|
||||
mu sync.Mutex
|
||||
origins []string
|
||||
//hosts []string
|
||||
redisBased bool
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user