go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

core/stores/redis.Pair.Score is int64, redis/v8.Z.Score is float64 ? why do this convert

Open htlhenry opened this issue 1 year ago • 0 comments

hello i want use go-zero/core/stores/redis as my redis client, but i saw in the redis.ZaddsCtx(), score is type int64, but wrapped redis client is float64, why do this convert?

https://github.com/zeromicro/go-zero/blob/34294702b0e88ad7d3e7e0ac494ee15cf103f0db/core/stores/redis/redis.go#L1878

htlhenry avatar Aug 05 '22 06:08 htlhenry

For compatibility reason. But any problem on this?

kevwan avatar Aug 18 '22 00:08 kevwan

that will be problem when i want store float not int, float may be more compat.

htlhenry avatar Aug 24 '22 06:08 htlhenry

fixed.

kevwan avatar Aug 25 '22 14:08 kevwan