Why require the string "EOF" at the end? Wh not wait for the actual EOF? Does it do multiple messages from the same pipe?<p>Edit: no, it doesn't. If you want to change this, you can use <a href="https://golang.org/pkg/io/ioutil/#ReadAll" rel="nofollow">https://golang.org/pkg/io/ioutil/#ReadAll</a> instead of bufio scanners.