hoisie / redis

A simple, powerful Redis client for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hset return value is not always correct

cpjolicoeur opened this issue · comments

Reading the code for Hset, this package is comparing the return value to 1 to determine the bool return value.

According to the redis docs for HSET, a return value of 1 indicates a new field was added to the hash with the value given, while a return value of 0 means the given field was already in the hash and it's value was updated.

So a return of 0 or 1 both should indicate a successful return value, shouldn't it?