Removed print statement in simple string encoding function

This commit is contained in:
Kelvin Clement Mwinuka
2023-07-01 22:42:53 +08:00
parent deda504ff0
commit b1fec4a0de
3 changed files with 4 additions and 4 deletions

View File

@@ -3,13 +3,14 @@
[x] Config file support [x] Config file support
[x] TCP support w/ TLS [x] TCP support w/ TLS
[x] HTTP support w/ TLS [x] HTTP support w/ TLS
[] Ping/Pong [x] Ping/Pong
[] String support [] String support
[] List support [] List support
[] Set support [] Set support
[] Sorted set support [] Sorted set support
[] Hash support [] Hash support
[] Stream support [] Stream support
[] Pub/Sub support
[] RediSearch support [] RediSearch support
[] RedisJSON support [] RedisJSON support
@@ -19,4 +20,5 @@
[] Bitmap support [] Bitmap support
[] Bitfield support [] Bitfield support
[] Add support for multiple root CAs on client side [] Support for multiple root CAs on client side
[] Clustering support

View File

@@ -33,7 +33,6 @@ func encodeSimpleString(wr *resp.Writer, tokens []string) error {
default: default:
return fmt.Errorf(wrong_args_error, strings.ToUpper(tokens[0])) return fmt.Errorf(wrong_args_error, strings.ToUpper(tokens[0]))
case 2: case 2:
fmt.Println(tokens[0], tokens[1])
wr.WriteSimpleString(tokens[1]) wr.WriteSimpleString(tokens[1])
return nil return nil
} }

View File

@@ -43,7 +43,6 @@ func (server *Server) handleConnection(conn net.Conn) {
if cmd, err := serialization.Decode(message); err != nil { if cmd, err := serialization.Decode(message); err != nil {
// Return error to client // Return error to client
serialization.Encode(connRW, fmt.Sprintf("Error %s", err.Error())) serialization.Encode(connRW, fmt.Sprintf("Error %s", err.Error()))
fmt.Println("Server: ", err)
continue continue
} else { } else {
// Return encoded message to client // Return encoded message to client