Closed zsimple closed 6 years ago
@zsimple sorry, I am not following:
$ redis-cli -p 9736 echo "hello world"
"hello world"
You can even add some debug to https://github.com/bsm/redeo/blob/master/redeo.go#L49, e.g. fmt.Println(len(c.Args), c.Args)
outputs 1 [hello world]
for me.
Right, I think I see now:
$ (printf "echo \"hello world\"\r\n"; sleep 1) | nc localhost 6379
$11
hello world
$ (printf "echo \"hello world\"\r\n"; sleep 1) | nc localhost 9736
-ERR wrong number of arguments for 'echo' command
-ERR EOF
see #19
Thanks very much again! It is really a useful library.
Thanks, you can also check out https://github.com/bsm/redeoraft and https://github.com/bsm/planb if you are looking for clustering
Very sweet library, thanks!
I found a litte problem when I want use it in my project: If I type
echo "hello world"
, c.ArgN() returns 2 rather then 1, redis do the right thing. Maybe it's better to parse double-quoted string as one argument rather then just split them by blank?