code: func isWebsocket(req *http.Request) bool {
  	if strings.ToLower(req.Header.Get("Upgrade")) != "websocket" ||
  		!strings.Contains(strings.ToLower(req.Header.Get("Connection")), "upgrade") {
  		return false
  	}
  	return true
  }
docs: // isWebsocket checks wether the incoming request is a part of websocket
  // handshake