File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -35,21 +35,21 @@ func handleConn(conn net.Conn) {
3535 if err != nil {
3636 return
3737 }
38-
38+
3939 tokens := parseInput (line )
4040 if len (tokens ) == 0 {
4141 continue
4242 }
43-
43+
4444 cmd := strings .ToUpper (tokens [0 ])
4545 args := tokens [1 :]
46-
46+
4747 if cmd == "EXIT" {
4848 w .WriteString ("BYE\n " )
4949 w .Flush ()
5050 return
5151 }
52-
52+
5353 resp := processCommand (cmd , args )
5454 w .WriteString (resp + "\n " )
5555 w .Flush ()
@@ -68,12 +68,12 @@ func processCommand(cmd string, args []string) string {
6868 if cmd == "PING" {
6969 return "PONG"
7070 }
71-
71+
7272 handler , ok := db .Commands [cmd ]
7373 if ! ok {
7474 return "ERR unknown command"
7575 }
76-
76+
7777 result , err := handler (args )
7878 if err != nil {
7979 return "ERR " + err .Error ()
You can’t perform that action at this time.
0 commit comments