Browse Source

返回类型修改

master v0.2.5
guzeng 3 years ago
parent
commit
4159d8168c
3 changed files with 5 additions and 5 deletions
  1. +2
    -2
      expire.go
  2. +2
    -2
      hash.go
  3. +1
    -1
      string.go

+ 2
- 2
expire.go View File

@ -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{}


+ 2
- 2
hash.go View File

@ -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...)


+ 1
- 1
string.go View File

@ -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...)


Loading…
Cancel
Save