Skip to content

Commit

Permalink
fix: add Cmder annotation (#2816)
Browse files Browse the repository at this point in the history
* fix: add Cmder annotation

Signed-off-by: rfyiamcool <rfyiamcool@163.com>

* fix: add Cmder annotation

Signed-off-by: rfyiamcool <rfyiamcool@163.com>

---------

Signed-off-by: rfyiamcool <rfyiamcool@163.com>
Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
  • Loading branch information
rfyiamcool and ofekshenawa committed Dec 17, 2023
1 parent e535124 commit 8c69548
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions command.go
Expand Up @@ -18,10 +18,22 @@ import (
)

type Cmder interface {
// command name.
// e.g. "set k v ex 10" -> "set", "cluster info" -> "cluster".
Name() string

// full command name.
// e.g. "set k v ex 10" -> "set", "cluster info" -> "cluster info".
FullName() string

// all args of the command.
// e.g. "set k v ex 10" -> "[set k v ex 10]".
Args() []interface{}

// format request and response string.
// e.g. "set k v ex 10" -> "set k v ex 10: OK", "get k" -> "get k: v".
String() string

stringArg(int) string
firstKeyPos() int8
SetFirstKeyPos(int8)
Expand Down

0 comments on commit 8c69548

Please sign in to comment.