From 4159d8168ca73f7818e53bbbd38e21b8e06237f6 Mon Sep 17 00:00:00 2001 From: guzeng Date: Sun, 23 May 2021 23:06:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=B1=BB=E5=9E=8B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- expire.go | 4 ++-- hash.go | 4 ++-- string.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/expire.go b/expire.go index ac471b1..36ece38 100644 --- a/expire.go +++ b/expire.go @@ -7,7 +7,7 @@ import ( /** * 使用用户名查询 */ -func SetExpire(key string, ttl int64, url ...string) (uint64, error) { +func SetExpire(key string, ttl int64, url ...string) (int64, error) { conn, _, err := Conn(url...) @@ -16,7 +16,7 @@ func SetExpire(key string, ttl int64, url ...string) (uint64, error) { } defer conn.Close() - req := &SetExpireRequest{proto.String(key), proto.Uint64(ttl), nil} + req := &SetExpireRequest{proto.String(key), proto.Int64(ttl), nil} res := &SetExpireResponse{} diff --git a/hash.go b/hash.go index 704e946..0d1ef67 100644 --- a/hash.go +++ b/hash.go @@ -31,7 +31,7 @@ func HGetString(key, field string, url ...string) (string, error) { } //设置 -func HSet(key, field, value string, url ...string) (uint64, error) { +func HSet(key, field, value string, url ...string) (int64, error) { conn, _, err := Conn(url...) @@ -54,7 +54,7 @@ func HSet(key, field, value string, url ...string) (uint64, error) { } //删除 -func HDel(key string, field string, url ...string) (uint64, error) { +func HDel(key string, field string, url ...string) (int64, error) { conn, _, err := Conn(url...) diff --git a/string.go b/string.go index ee58af4..4124caf 100644 --- a/string.go +++ b/string.go @@ -53,7 +53,7 @@ func Set(key, value string, ttl int64, url ...string) (string, error) { } //删除 -func Del(key string, url ...string) (uint64, error) { +func Del(key string, url ...string) (int64, error) { conn, _, err := Conn(url...)