|
|
@ -30,7 +30,7 @@ func GetString(key string, url ...string) (string, error) { |
|
|
|
} |
|
|
|
|
|
|
|
//设置
|
|
|
|
func Set(key, value string, ttl uint64, url ...string) (uint64, error) { |
|
|
|
func Set(key, value string, ttl string, url ...string) (uint64, error) { |
|
|
|
|
|
|
|
conn, _, err := Conn(url...) |
|
|
|
|
|
|
@ -39,7 +39,7 @@ func Set(key, value string, ttl uint64, url ...string) (uint64, error) { |
|
|
|
} |
|
|
|
defer conn.Close() |
|
|
|
|
|
|
|
req := &SetRequest{proto.String(key), proto.String(value), proto.Uint64(ttl), nil} |
|
|
|
req := &SetRequest{proto.String(key), proto.String(value), proto.String(ttl), nil} |
|
|
|
|
|
|
|
res := &SetResponse{} |
|
|
|
|
|
|
@ -53,7 +53,7 @@ func Set(key, value string, ttl uint64, url ...string) (uint64, error) { |
|
|
|
} |
|
|
|
|
|
|
|
//设置
|
|
|
|
func Del(key, value string, url ...string) (uint64, error) { |
|
|
|
func Del(key string, url ...string) (uint64, error) { |
|
|
|
|
|
|
|
conn, _, err := Conn(url...) |
|
|
|
|
|
|
|