title: Golang http package: Request.WithContext method src code explanation
body: <p>Following is an excerpt from source code of <code>http/request.go</code> line 290:</p>
  
  <pre><code>// WithContext returns a shallow copy of r with its context changed
  // to ctx. The provided ctx must be non-nil.
  func (r *Request) WithContext(ctx context.Context) *Request {
      if ctx == nil {
          panic("nil context")
      }
      r2 := new(Request)      //
      *r2 = *r                // strange gymnastics
      r2.ctx = ctx            //
      return r2
  }
  </code></pre>
  
  <p>I looked at it for an hour trying to understand last 4 lines. Why is that gymnastics for? Doesn't it means just the following:</p>
  
  <pre><code>r.ctx = ctx
  return r
  </code></pre>
  
  <p>Or do I miss something?</p>