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

use exported error redis.Nil #20

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion slidingwindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
case <-done:
if err == redis.TxFailedErr {
return 0, 0, errors.Wrap(err, "redis transaction failed")
} else if err != nil && err.Error() == "redis: nil" { // TODO: is there an exported error of that type?
} else if err != nil && err.Error() == redis.Nil {

Check failure on line 139 in slidingwindow.go

View workflow job for this annotation

GitHub Actions / Linter

invalid operation: err.Error() == redis.Nil (mismatched types string and "github.com/redis/go-redis/v9/internal/proto".RedisError) (compile)

Check failure on line 139 in slidingwindow.go

View workflow job for this annotation

GitHub Actions / Go vet

invalid operation: err.Error() == redis.Nil (mismatched types string and "github.com/redis/go-redis/v9/internal/proto".RedisError)

Check failure on line 139 in slidingwindow.go

View workflow job for this annotation

GitHub Actions / go-test (1.18)

invalid operation: err.Error() == redis.Nil (mismatched types string and "github.com/redis/go-redis/v9/internal/proto".RedisError)
prevCount = 0
} else if err != nil {
return 0, 0, errors.Wrap(err, "unexpected error from redis")
Expand Down
Loading