title: Why doesn't this code loop forever with a break label?
body: <p>I am trying to figure out how break with labels works.</p>
  
  <p>I expect the following program to keep printing "In if statement" forever. This is because the <code>break here</code> statement brings the code execution back up to the beginning for loop which should then be executed again and again.</p>
  
  <p>However, this code is only executed once. What am I missing here?</p>
  
  <pre><code>package main
  
  import "fmt"
  
  func main() {
  here:
      for {
          fmt.Println("In if statement")
          break here
  
      }
      fmt.Println("At the bottom")
  }
  </code></pre>
  
  <p>Execution result:</p>
  
  <pre><code>In if statement
  At the bottom
  
  Program exited.
  </code></pre>
  
  <p><a href="http://play.golang.org/p/y9kH1YZezJ" rel="noreferrer">http://play.golang.org/p/y9kH1YZezJ</a></p>