code: func maybeWrapForConnectionUpgrades(restConfig *restclient.Config, rt http.RoundTripper, req *http.Request) (http.RoundTripper, bool, error) {
  	if !httpstream.IsUpgradeRequest(req) {
  		return rt, false, nil
  	}
  
  	tlsConfig, err := restclient.TLSConfigFor(restConfig)
  	if err != nil {
  		return nil, true, err
  	}
  	followRedirects := utilfeature.DefaultFeatureGate.Enabled(genericfeatures.StreamingProxyRedirects)
  	requireSameHostRedirects := utilfeature.DefaultFeatureGate.Enabled(genericfeatures.ValidateProxyRedirects)
  	upgradeRoundTripper := spdy.NewRoundTripper(tlsConfig, followRedirects, requireSameHostRedirects)
  	wrappedRT, err := restclient.HTTPWrappersForConfig(restConfig, upgradeRoundTripper)
  	if err != nil {
  		return nil, true, err
  	}
  
  	return wrappedRT, true, nil
  }
docs: // maybeWrapForConnectionUpgrades wraps the roundtripper for upgrades.  The bool indicates if it was wrapped