From cb9de7a3716a84525f5b1c932b9fbdfaeae67d6c Mon Sep 17 00:00:00 2001 From: Kelvin Clement Mwinuka Date: Sun, 11 Feb 2024 16:37:14 +0800 Subject: [PATCH] Fixed PING echo command --- src/modules/ping/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ping/commands.go b/src/modules/ping/commands.go index a98a9f9..c784ed5 100644 --- a/src/modules/ping/commands.go +++ b/src/modules/ping/commands.go @@ -33,7 +33,7 @@ func handlePing(ctx context.Context, cmd []string, server utils.Server, conn *ne case 1: return []byte("+PONG\r\n\r\n"), nil case 2: - return []byte(fmt.Sprintf("%s\r\n%d\r\n%s\r\n\r\n", "$", len(cmd[1]), cmd[1])), nil + return []byte(fmt.Sprintf("$%d\r\n%s\r\n\r\n", len(cmd[1]), cmd[1])), nil } }