title: Empty return in func with return value in golang
body: <p>I was reading some code written in <strong><code>Golang</code></strong> on Github and found a very interesting piece of code. I simplified it to be clear.</p>
  
  <pre><code>func  Insert(docs ...interface{}) (err error) {
      for i := 0; i &lt; 3; i++ {
          err = fmt.Errorf("")
          if err.Error()!="EOF" {
              return
          }
      }
      return 
  }
  </code></pre>
  
  <p>I'm very confused about empty return here... How it works? Does he return nil as error or breaks for loop? I understand that this question looks dummy, but I cannot find any info on this in go docs... Also, I don't understand how we can return err, which is, as I understood, declared somehow in return. Does (err error) means that we already have an error variable available in our <code>func</code> which is used as default return value if none specified? Why then we implicitly make return err at the end of <code>func</code>?</p>
  
  <p>I'll be very gratefull for explanation. </p>