From ff8419f6430c9f57c7857703708684c8b3737d91 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Thu, 21 Jul 2016 13:24:58 +0000 Subject: [PATCH] Rename Commander to Cmdable to match internal name. --- commands.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/commands.go b/commands.go index 112a547..769dcb1 100644 --- a/commands.go +++ b/commands.go @@ -40,11 +40,7 @@ func formatSec(dur time.Duration) string { return strconv.FormatInt(int64(dur/time.Second), 10) } -type cmdable struct { - process func(cmd Cmder) error -} - -type Commander interface { +type Cmdable interface { Echo(message interface{}) *StringCmd Ping() *StatusCmd Quit() *StatusCmd @@ -208,8 +204,6 @@ type Commander interface { ShutdownSave() *StatusCmd ShutdownNoSave() *StatusCmd SlaveOf(host, port string) *StatusCmd - SlowLog() - Sync() Time() *StringSliceCmd Eval(script string, keys []string, args ...interface{}) *Cmd EvalSha(sha1 string, keys []string, args ...interface{}) *Cmd @@ -247,6 +241,12 @@ type Commander interface { Command() *CommandsInfoCmd } +type cmdable struct { + process func(cmd Cmder) error +} + +var _ Cmdable = (*cmdable)(nil) + type statefulCmdable struct { process func(cmd Cmder) error } @@ -1739,6 +1739,7 @@ func (c *cmdable) Sync() { panic("not implemented") } +// TODO: add TimeCmd and use it here func (c *cmdable) Time() *StringSliceCmd { cmd := NewStringSliceCmd("time") c.process(cmd)