From e659a670dded350f45da7b9c0924a925a7443510 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Fri, 10 Jul 2015 17:21:24 +0000 Subject: Use NUL as field separator. This way spaces can be sent as useful data to commands. --- cmd/goctl/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/goctl') diff --git a/cmd/goctl/main.go b/cmd/goctl/main.go index 9a8e01c..395a643 100644 --- a/cmd/goctl/main.go +++ b/cmd/goctl/main.go @@ -26,7 +26,7 @@ func main() { } defer c.Close() - goctl.Write(c, []byte(strings.Join(flag.Args(), " "))) + goctl.Write(c, []byte(strings.Join(flag.Args(), "\u0000"))) if buf, err := goctl.Read(c); err != nil { log.Fatalf("Error reading response from command: %s.", err) } else { -- cgit v1.3