title: Read lines from stdin until certain character
body: <p>I'm learning Go.</p>
  
  <p>My program should read data from stdin until I enter a line with a single period.</p>
  
  <pre><code>package main
  
  import (
  
    "os"
    "fmt"
    "bufio"
  
  )
  
  func main(){
  
    in    := bufio.NewReader(os.Stdin)
    input := ""
  
    for input != "." {
      input, err := in.ReadString('\n')
      if err != nil {
        panic(err)
      }
    }
  }
  </code></pre>
  
  <p>How I should modify my for loop, to stop the program when I enter a single dot ?</p>
  
  <p>I tried to implement a while loop with the for statement, is there something wrong with my approach, is the condition wrong, or is ReadString messing with my data ?</p>