mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-21 23:19:22 +08:00
Begining to implement Append command
This commit is contained in:
@@ -16,6 +16,7 @@ package str
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/echovault/echovault/internal"
|
||||
"github.com/echovault/echovault/internal/constants"
|
||||
)
|
||||
@@ -52,3 +53,14 @@ func subStrKeyFunc(cmd []string) (internal.KeyExtractionFuncResult, error) {
|
||||
WriteKeys: make([]string, 0),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func appendKeyFunc(cmd []string) (internal.KeyExtractionFuncResult, error) {
|
||||
if len(cmd) != 4 {
|
||||
return internal.KeyExtractionFuncResult{}, errors.New(constants.WrongArgsResponse)
|
||||
}
|
||||
return internal.KeyExtractionFuncResult{
|
||||
Channels: make([]string, 0),
|
||||
ReadKeys: cmd[1:2],
|
||||
WriteKeys: make([]string, 0),
|
||||
}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user