Return PONG response from server

This commit is contained in:
Kelvin Clement Mwinuka
2023-06-26 19:41:38 +08:00
parent 40be716513
commit e0e865fd56
3 changed files with 49 additions and 23 deletions

View File

@@ -24,6 +24,10 @@ func tokenize(comm string) ([]string, error) {
return r.Read()
}
func EncodeSimpleString(wr *resp.Writer, token string) error {
return wr.WriteSimpleString(token)
}
func encodePingPong(wr *resp.Writer, tokens []string) error {
switch len(tokens) {
default: