Can now run batch which can be tested by:
```shell
echo -e "echo foo\necho blue" | abci-cli batch
```
giving
```shell
I[12-12|07:55:55.513] Starting socketClient
module=abci-client impl=socketClient
-> code: OK
-> data: foo
-> data.hex: 0x666F6F
-> code: OK
-> data: blue
-> data.hex: 0x626C7565
```
Use the single client connection at startup time
for sending over commands instead of shelling out
for every command.
This code fixes the regression from
https://github.com/tendermint/abci/pull/117
which instead used "os/exec".Command with:
"abci-cli <the_command> [args...]"
The purpose of this code is to restore us
back to the state after cobra replace urlfave/cli.
There is still a bit of work to implement Batch
itself, but that should be simpler as a focused
command.
Fixes#133
This commit adds the basic test command 'abci-cli test' that will
allow developers of server for their own language to continuously test
their implementation.
plus make Client interface more consistent. All *Sync functions now
return an error as a second return param. Deliver/Check/Commit use Code
to indicate errors and have IsErr() func defined on ResponseXYZ structs.
Spell out the package explicitly.
This commit is totally textual, and does not change any logic.
The swiss-army knife package may serve a kick-start in early
stage development. But as the codebase growing, we might want
to retire it gradually:
For simple wrapping functions, just inline it on the call site.
For larger pice of code, make it an independent package.