title: How to break from the scanner.scan() for-loop?
body: <p>When I use "bufio" package, the standard code is just like:</p>
  
  <pre><code>input := bufio.NewScanner(os.Stdin)
  for input.Scan() {
      // xxxxx
  }
  </code></pre>
  
  <p>When I run the program, the for-loop can't stop whatever I input. I have tried newline, space, ctrl-d, ctrl-z. According to the document, a blank newline should be able to stop the program.</p>
  
  <p>The program is running under Windows 7 CMD environment, or mingw-bash.</p>
  
  <p>Thanks.</p>