h2non / imaginary

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing

Home Page:https://fly.io/docs/app-guides/run-a-global-image-service/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

throttled.NewGCRARateLimiter is deprecated

suntong opened this issue · comments

Just building the image from Dockerfile from the latest imaginary repo, and will get:

Step 15/28 : RUN golangci-lint run .
 ---> Running in 5b2009661372
middleware.go:75:22: SA1019: throttled.NewGCRARateLimiter is deprecated: Use NewGCRARateLimiterCtx instead. If the used store does not implement GCRAStoreCtx, wrap it with WrapStoreWithContext().  (staticcheck)
        rateLimiter, err := throttled.NewGCRARateLimiter(store, quota)
                            ^
middleware.go:80:21: SA1019: throttled.HTTPRateLimiter is deprecated: Use HTTPRateLimiterCtx instead. If the used RateLimiter does not implement RateLimiterCtx, wrap it with WrapRateLimiterWithContext().  (staticcheck)
        httpRateLimiter := throttled.HTTPRateLimiter{
                           ^
middleware.go:85:9: SA1019: httpRateLimiter.RateLimit is deprecated: Use HTTPRateLimiterCtx instead  (staticcheck)
        return httpRateLimiter.RateLimit(next)
               ^
The command '/bin/sh -c golangci-lint run .' returned a non-zero code: 1