title: In golang how calling a function with and without trailing brackets works when using net/http
body: <p>In the main function, I have a gorilla mux router, and a function to handle the route.</p>
  
  <pre><code>var router = mux.NewRouter()
  func main() {   
      router.HandleFunc("/", ParseSlash)
      http.Handle("/", router)
      http.ListenAndServe(":8000", nil)
  }
  </code></pre>
  
  <p>and ParseSlash looks like</p>
  
  <pre><code>const slash = `&lt;h1&gt;Login&lt;/h1&gt;
  &lt;form method="post" action="/login"&gt;
    &lt;label for="name"&gt;User name&lt;/label&gt;
    &lt;input type="text" id="name" name="name"&gt;
    &lt;label for="password"&gt;Password&lt;/label&gt;
    &lt;input type="password" id="password" name="password"&gt;
    &lt;button type="submit"&gt;Login&lt;/button&gt;
  &lt;/form&gt;`
  
  func ParseSlash(response http.ResponseWriter, request *http.Request)  {
      fmt.Fprintf(response, slash)
  }
  </code></pre>
  
  <p>However, in main, we are not calling the function as <code>ParseSlash()</code>, but <code>ParseSlash</code> inside <code>router.HandleFunc()</code>. Where do the function get the parameters from, if we are not providing explicitely? What is this way of calling a function termed as?</p>
  
  <p>Thank you.</p>