Implementing APPEND command

This commit is contained in:
DMcP89
2024-06-26 23:01:01 -04:00
parent d755f6fae5
commit 51198e3c26
2 changed files with 36 additions and 4 deletions

View File

@@ -55,12 +55,12 @@ func subStrKeyFunc(cmd []string) (internal.KeyExtractionFuncResult, error) {
}
func appendKeyFunc(cmd []string) (internal.KeyExtractionFuncResult, error) {
if len(cmd) != 4 {
if len(cmd) != 3 {
return internal.KeyExtractionFuncResult{}, errors.New(constants.WrongArgsResponse)
}
return internal.KeyExtractionFuncResult{
Channels: make([]string, 0),
ReadKeys: cmd[1:2],
WriteKeys: make([]string, 0),
ReadKeys: make([]string, 0),
WriteKeys: cmd[1:2],
}, nil
}