code: func IsUpgradeRequest(req *http.Request) bool {
  	for _, h := range req.Header[http.CanonicalHeaderKey(HeaderConnection)] {
  		if strings.Contains(strings.ToLower(h), strings.ToLower(HeaderUpgrade)) {
  			return true
  		}
  	}
  	return false
  }
docs: // IsUpgradeRequest returns true if the given request is a connection upgrade request