use bufio.Reader instead of scanner