mediocregopher / radix.v2

Redis client for Go
http://godoc.org/github.com/mediocregopher/radix.v2
MIT License
433 stars 92 forks source link

check "response is nil" when invoke Float64() #97

Open pabno opened 4 years ago

pabno commented 4 years ago
  1. zscore will return "$-1" in protocol when there is no cotent in redis,and it aslo will return a float score
  2. func bufioReadResp(r *bufio.Reader) (Resp, error) will return Resp{typ: Nil}, nil when there is no key in redis
  3. resp.Float64() did'nt handle this case and return Resp{typ: Nil}, nil, client need to handle this special case