code: func Negotiate(upgrader Upgrader, client *http.Client, req *http.Request, protocols ...string) (httpstream.Connection, string, error) {
  	for i := range protocols {
  		req.Header.Add(httpstream.HeaderProtocolVersion, protocols[i])
  	}
  	resp, err := client.Do(req)
  	if err != nil {
  		return nil, "", fmt.Errorf("error sending request: %v", err)
  	}
  	defer resp.Body.Close()
  	conn, err := upgrader.NewConnection(resp)
  	if err != nil {
  		return nil, "", err
  	}
  	return conn, resp.Header.Get(httpstream.HeaderProtocolVersion), nil
  }
docs: // Negotiate opens a connection to a remote server and attempts to negotiate
  // a SPDY connection. Upon success, it returns the connection and the protocol selected by
  // the server. The client transport must use the upgradeRoundTripper - see RoundTripperFor.