code: func isWebsocketRequest(req *http.Request) bool {
  	containsHeader := func(name, value string) bool {
  		items := strings.Split(req.Header.Get(name), ",")
  		for _, item := range items {
  			if value == strings.ToLower(strings.TrimSpace(item)) {
  				return true
  			}
  		}
  		return false
  	}
  	return containsHeader(connection, "upgrade") && containsHeader(upgrade, "websocket")
  }
docs: // isWebsocketRequest returns whether the specified HTTP request is a
  // websocket handshake request