Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lucifercr07 committed Dec 11, 2024
1 parent 2e45060 commit 7a99484
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
9 changes: 0 additions & 9 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,6 @@ func getEnvArray(key string, fallback []string) []string {
return fallback
}

func getEnvBool(key string, fallback bool) bool {
if value, exists := os.LookupEnv(key); exists {
if boolValue, err := strconv.ParseBool(value); err == nil {
return boolValue
}
}
return fallback
}

// splitString splits a string by comma and returns a slice of strings
func splitString(s string) []string {
var array []string
Expand Down
2 changes: 0 additions & 2 deletions internal/middleware/ratelimiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ type (
client *db.DiceDB
limit int64
window float64
conf *config.Config
cronFrequencyInterval time.Duration
}
)
Expand Down Expand Up @@ -203,7 +202,6 @@ func MockRateLimiter(client *mock.DiceDBMock, next http.Handler, limit int64, wi
}

func addRateLimitHeaders(w http.ResponseWriter, limit, remaining, used, resetTime, secondsLeftForCleanup int64) {

w.Header().Set("x-ratelimit-limit", strconv.FormatInt(limit, 10))
w.Header().Set("x-ratelimit-remaining", strconv.FormatInt(remaining, 10))
w.Header().Set("x-ratelimit-used", strconv.FormatInt(used, 10))
Expand Down
1 change: 0 additions & 1 deletion internal/server/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ func errorResponse(response string) string {

func NewHTTPServer(router *gin.Engine, diceDBAdminClient *db.DiceDB, diceClient *db.DiceDB,
limit int64, window float64) *HTTPServer {

return &HTTPServer{
httpServer: &http.Server{
Addr: ":8080",
Expand Down

0 comments on commit 7a99484

Please sign in to comment.