Fixed PING echo command

This commit is contained in:
Kelvin Clement Mwinuka
2024-02-11 16:37:14 +08:00
parent 4a2b9a34db
commit cb9de7a371

View File

@@ -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
}
}