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

BitCount return ERR syntax error #2956

Closed
ViolaPioggia opened this issue Apr 3, 2024 · 0 comments
Closed

BitCount return ERR syntax error #2956

ViolaPioggia opened this issue Apr 3, 2024 · 0 comments

Comments

@ViolaPioggia
Copy link

ViolaPioggia commented Apr 3, 2024

I use go-redis with BitCount like this but return ERR syntax error

res, err := svc.Svc.Rdb.BitCount(ctx,
	fmt.Sprintf("%s%s",
	jwzxconsts.RdbKeyNewsRead,
	item.Id,
	),
	&redis.BitCount{
	        Start: 0,
		End:   -1,
	},
).Result()

Expected Behavior

return bitcount value normally

Current Behavior

return ERR syntax error

Possible Solution

My current go-redis version is v9.5.1(newest) , when I roll back to the v9.3.0 , this problem is soluted

redis v7.0.0 bitcount add a field 'Unit' , and In go-redis v9.5.1 it will add this field automically, but my redis version is below v7.0.0
so that it returned ERR syntax error

Context (Environment)

go version: 1.21.8
redis version: 6.2.8
go-redis version: 9.5.1

Detailed Description

I prefer you can ensure forward compatibility

@ViolaPioggia ViolaPioggia changed the title BitCount report ERR syntax error BitCount return ERR syntax error Apr 3, 2024
monkey92t added a commit that referenced this issue Apr 3, 2024
Signed-off-by: monkey92t <golang@88.com>
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