|
|
@ -35,7 +35,7 @@ func Set(key, value string, ttl string, url ...string) (string, error) { |
|
|
|
conn, _, err := Conn(url...) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
return "", err |
|
|
|
} |
|
|
|
defer conn.Close() |
|
|
|
|
|
|
@ -46,7 +46,7 @@ func Set(key, value string, ttl string, url ...string) (string, error) { |
|
|
|
err = conn.Set(req, res) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
return "", err |
|
|
|
} |
|
|
|
|
|
|
|
return res.GetRet(), nil |
|
|
@ -58,7 +58,7 @@ func Del(key string, url ...string) (string, error) { |
|
|
|
conn, _, err := Conn(url...) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
return "", err |
|
|
|
} |
|
|
|
defer conn.Close() |
|
|
|
|
|
|
@ -69,7 +69,7 @@ func Del(key string, url ...string) (string, error) { |
|
|
|
err = conn.Del(req, res) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
return "", err |
|
|
|
} |
|
|
|
|
|
|
|
return res.GetRet(), nil |
|
|
|