aboutsummaryrefslogtreecommitdiff
path: root/robo.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-31 05:40:41 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-31 05:40:41 +0200
commit08afcb6c1cd7f7edb220e128488ed706553b0831 (patch)
tree7e3e84c838b484a0ade54ee976a0004fcb82e973 /robo.go
parent5747d262fd4eebd89ebfbb33f1571da859feeef1 (diff)
Expose Send and Recv
Diffstat (limited to 'robo.go')
-rw-r--r--robo.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/robo.go b/robo.go
index 8d7825b..2181bc5 100644
--- a/robo.go
+++ b/robo.go
@@ -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") }