title: Why is http.Client{} prefixed with &?
body: <p>I am learning Go and I am reading Go's official documentation about <a href="https://golang.org/pkg/net/http/" rel="noreferrer"><code>net/http</code></a>, and I write following code from doc for test:</p>
  
  <pre><code>package main
  
  import (
      "net/http"
      "fmt"
  )
  
  func main() {
      client := &amp;http.Client{}
      resp, _ := client.Get("http://example.com")
  
      fmt.Println(resp)
  }
  </code></pre>
  
  <p><code>http.Client</code> is a struct, but I do not know why there is a <code>&amp;</code> pointer prefixed. I think creating a <code>http.Client</code> reference is not necessary. And why does the <code>client</code> variable have a <code>Get</code> method? I am reading the source code of <code>net/http</code>, it defines the <code>Client</code> struct below:</p>
  
  <pre><code>type Client struct {
      Transport RoundTripper
      CheckRedirect func(req *Request, via []*Request) error
      Jar CookieJar
      Timeout time.Duration
  }
  </code></pre>
  
  <p>The <code>Client</code> struct does not have a <code>Get</code> method defined; why does the <code>client</code> variable have a <code>Get</code> method?</p>