mirror of
https://github.com/redis/go-redis.git
synced 2025-06-12 14:21:52 +03:00
Merge pull request #130 from go-redis/fix/restore-time-duration
Use time.Duration in Restore.
This commit is contained in:
@ -238,11 +238,11 @@ func (c *commandable) RenameNX(key, newkey string) *BoolCmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *commandable) Restore(key string, ttl int64, value string) *StatusCmd {
|
||||
func (c *commandable) Restore(key string, ttl time.Duration, value string) *StatusCmd {
|
||||
cmd := NewStatusCmd(
|
||||
"RESTORE",
|
||||
key,
|
||||
formatInt(ttl),
|
||||
formatMs(ttl),
|
||||
value,
|
||||
)
|
||||
c.Process(cmd)
|
||||
|
Reference in New Issue
Block a user