Files

19 lines
228 B
Go
Raw Permalink Normal View History

package main
import (
2016-03-10 17:54:32 -08:00
"bufio"
"log"
"os"
)
func readInput() {
2016-03-10 17:54:32 -08:00
r := bufio.NewReader(os.Stdin)
for {
line, err := r.ReadBytes('\n')
2016-03-10 17:59:24 -08:00
if err != nil {
log.Fatal("Input read error: ", err)
2016-03-10 17:59:24 -08:00
}
h.broadcast <- line
}
}