h2non / imaginary

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
https://fly.io/docs/app-guides/run-a-global-image-service/
MIT License
5.5k stars 455 forks source link

throttled.NewGCRARateLimiter is deprecated #419

Open suntong opened 9 months ago

suntong commented 9 months ago

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