diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2015-05-31 05:40:41 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2015-05-31 05:40:41 +0200 |
commit | 08afcb6c1cd7f7edb220e128488ed706553b0831 (patch) | |
tree | 7e3e84c838b484a0ade54ee976a0004fcb82e973 /robo.go | |
parent | 5747d262fd4eebd89ebfbb33f1571da859feeef1 (diff) |
Expose Send and Recv
Diffstat (limited to 'robo.go')
-rw-r--r-- | robo.go | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -128,15 +128,17 @@ func recv(c *bufio.Reader) string { return ans[:len(ans)-1] } +func Recv(c *bufio.Reader) string { + return recv(c) +} + func send(c *bufio.Writer, a ...interface{}) { fmt.Fprint(c, a...) etx(c) } -func Raw(c *bufio.Writer, a ...interface{}) { - for _, cmd := range a { - send(c, cmd) - } +func Send(c *bufio.Writer, a interface{}) { + send(c, a) } func GoHome(c *bufio.Writer) { send(c, "TT") } |