|
|
@ -3,6 +3,7 @@ package redisrpc |
|
|
|
import ( |
|
|
|
"encoding/json" |
|
|
|
"log" |
|
|
|
"strconv" |
|
|
|
|
|
|
|
"github.com/golang/protobuf/proto" |
|
|
|
) |
|
|
@ -174,7 +175,7 @@ func HExists(key string, field string, url ...string) (int64, error) { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func HIncrby(key, field string,value int64, url ...string) (int64, error) { |
|
|
|
func HIncrby(key, field string,value int, url ...string) (int64, error) { |
|
|
|
|
|
|
|
conn, _, err := Conn(url...) |
|
|
|
|
|
|
@ -183,7 +184,7 @@ func HIncrby(key, field string,value int64, url ...string) (int64, error) { |
|
|
|
} |
|
|
|
defer conn.Close() |
|
|
|
|
|
|
|
req := &HSetRequest{proto.String(key), proto.String(field), proto.String(string(value)), nil} |
|
|
|
req := &HSetRequest{proto.String(key), proto.String(field), proto.String(strconv.Itoa(value)), nil} |
|
|
|
|
|
|
|
res := &HSetResponse{} |
|
|
|
|
|
|
|