title: convert function type in Golang
body: <pre><code>// Each type have Error() string method.
  // The error built-in interface type is the conventional interface for
  // representing an error condition, with the nil value representing no error.
  //  type error interface {
  //   Error() string
  //  }
  
  func (f binFunc) Error() string {
      return "binFunc error"
  }
  
  func func_type_convert() {
      var err error
      err = binFunc(add)
      fmt.Println(err)
      fmt.Println(i)
  }
  </code></pre>
  
  <p>I have two questions about the code above:</p>
  
  <ul>
  <li>I don't know why the <code>Error</code> method executed, when <code>add</code> function was converted into <code>binFunc</code> type?</li>
  <li>Why the <code>add</code> function converted result was able to assign to an err error interface variable?</li>
  </ul>