From cb1ef6c897dc0b3cce2fd8b026dd00ba5ea2cbfb Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Tue, 29 Oct 2024 18:49:00 +0100 Subject: [PATCH] refactor: rename HandleConnections to HandleConnection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - rename function to better reflect its purpose 🤖 --- .../websocket/{handle_connections.go => handle_connection.go} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename internal/websocket/{handle_connections.go => handle_connection.go} (86%) diff --git a/internal/websocket/handle_connections.go b/internal/websocket/handle_connection.go similarity index 86% rename from internal/websocket/handle_connections.go rename to internal/websocket/handle_connection.go index 4b5f1b1..707bea8 100644 --- a/internal/websocket/handle_connections.go +++ b/internal/websocket/handle_connection.go @@ -18,8 +18,8 @@ var upgrader = websocket.Upgrader{ CheckOrigin: func(r *http.Request) bool { return true }, } -// HandleConnections upgrades HTTP requests to WebSocket connections and manages the client lifecycle. -func HandleConnections(w http.ResponseWriter, r *http.Request) { +// HandleConnection upgrades HTTP requests to WebSocket connections and manages the client lifecycle. +func HandleConnection(w http.ResponseWriter, r *http.Request) { // Upgrade initial GET request to a WebSocket ws, err := upgrader.Upgrade(w, r, nil) if err != nil {