mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-14 20:16:05 +08:00
Added array serialization to encode function. Moved message reading to utils packages as it's used by both server and client
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
func Decode(raw string) ([]string, error) {
|
||||
rd := resp.NewReader(bytes.NewBufferString(raw))
|
||||
res := []string{}
|
||||
|
||||
v, _, err := rd.ReadValue()
|
||||
|
||||
@@ -16,8 +17,6 @@ func Decode(raw string) ([]string, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
res := []string{}
|
||||
|
||||
if v.Type().String() == "SimpleString" {
|
||||
return []string{v.String()}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user