aboutsummaryrefslogtreecommitdiffstats
path: root/golib/eows/eows-in.go
diff options
context:
space:
mode:
Diffstat (limited to 'golib/eows/eows-in.go')
-rw-r--r--golib/eows/eows-in.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/golib/eows/eows-in.go b/golib/eows/eows-in.go
index 89ca891..5e74c76 100644
--- a/golib/eows/eows-in.go
+++ b/golib/eows/eows-in.go
@@ -13,21 +13,21 @@ type DoneChan struct {
err error
}
-// cmdPumpStdin is in charge of receive characters and send them to stdin
-func (e *ExecOverWS) cmdPumpStdin(inw *os.File) {
+// pumpStdin is in charge of receive characters and send them to stdin
+func (e *ExecOverWS) pumpStdin(inw *os.File) {
done := make(chan DoneChan, 1)
if e.InputEvent != "" && e.InputCB != nil {
- err := (*e.SocketIO).On(e.InputEvent, func(stdin string) {
- in, err := e.InputCB(e, string(stdin))
+ err := (*e.SocketIO).On(e.InputEvent, func(stdin []byte) {
+ in, err := e.InputCB(e, stdin)
if err != nil {
e.logDebug("Error stdin: %s", err.Error())
inw.Close()
return
}
- if _, err := inw.Write([]byte(in)); err != nil {
+ if _, err := inw.Write(in); err != nil {
e.logError("Error while writing to stdin: %s", err.Error())
}
})