mirror of https://github.com/go-redis/redis.git
Remove extractKeys function
This commit is contained in:
parent
8de72d6d3c
commit
be805cbe10
24
command.go
24
command.go
|
@ -122,30 +122,6 @@ func cmdString(cmd Cmder, val interface{}) string {
|
|||
return util.BytesToString(b)
|
||||
}
|
||||
|
||||
func extractKeys(cmd Cmder) []string {
|
||||
firstKeyPos := cmdFirstKeyPos(cmd)
|
||||
if firstKeyPos == -1 {
|
||||
return nil
|
||||
}
|
||||
|
||||
args := cmd.Args()
|
||||
keys := []string{}
|
||||
|
||||
switch cmd.Name() {
|
||||
case "mget":
|
||||
for i := int(firstKeyPos); i < len(args); i++ {
|
||||
keys = append(keys, cmd.stringArg(i))
|
||||
}
|
||||
|
||||
default:
|
||||
if int(firstKeyPos) < len(args) {
|
||||
keys = append(keys, cmd.stringArg(firstKeyPos))
|
||||
}
|
||||
}
|
||||
|
||||
return keys
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
type baseCmd struct {
|
||||
|
|
Loading…
Reference in New Issue