Skip to content

Commit

Permalink
Remove extractKeys function
Browse files Browse the repository at this point in the history
  • Loading branch information
ofekshenawa committed Sep 22, 2024
1 parent 8de72d6 commit be805cb
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit be805cb

Please sign in to comment.