title: golang recursive function calling itself as a goroutine doesn't work as expected
body: <p>This recursive function works as expected (returns 5 lines with numbers 5 to 1):</p>
  
  <pre><code>package main
  import (
      "fmt"
  )
  func recur(iter int) {
      if iter &lt;= 0 {
          return
      }
      fmt.Println(iter)
      recur(iter-1)
  }
  func main() {
      recur(5)
  }
  </code></pre>
  
  <p>this one does not (returns only 1 line with number 5):</p>
  
  <pre><code>    package main
  import (
      "fmt"
  )
  func recur(iter int) {
      if iter &lt;= 0 {
          return
      }
      fmt.Println(iter)
      go recur(iter-1)
  }
  func main() {
      recur(5)
  }
  </code></pre>
  
  <p>The difference is that in the second implementation, function calls itself as a goroutine. (line <code>go recur(iter-1)</code> )</p>
  
  <p>So can someone explain this behaviour?</p>