1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-12 14:21:52 +03:00

Add TimeCmd.

This commit is contained in:
Vladimir Mihailenco
2016-10-14 14:39:02 +03:00
parent 6f8957c5b7
commit dcdf129dd5
4 changed files with 79 additions and 7 deletions

View File

@ -199,7 +199,7 @@ type Cmdable interface {
ShutdownSave() *StatusCmd
ShutdownNoSave() *StatusCmd
SlaveOf(host, port string) *StatusCmd
Time() *StringSliceCmd
Time() *TimeCmd
Eval(script string, keys []string, args ...interface{}) *Cmd
EvalSha(sha1 string, keys []string, args ...interface{}) *Cmd
ScriptExists(scripts ...string) *BoolSliceCmd
@ -1741,9 +1741,8 @@ func (c *cmdable) Sync() {
panic("not implemented")
}
// TODO: add TimeCmd and use it here
func (c *cmdable) Time() *StringSliceCmd {
cmd := NewStringSliceCmd("time")
func (c *cmdable) Time() *TimeCmd {
cmd := NewTimeCmd("time")
c.process(cmd)
return cmd
}