Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throttled.NewGCRARateLimiter is deprecated #419

Open
suntong opened this issue Nov 29, 2023 · 0 comments
Open

throttled.NewGCRARateLimiter is deprecated #419

suntong opened this issue Nov 29, 2023 · 0 comments

Comments

@suntong
Copy link

suntong commented Nov 29, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant