From ca3faa0144ab3292b2fd4c4a9598254dcaefd4dd Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 12:49:30 +0100 Subject: [PATCH] ax(node): rename channel to responseChannel in handleResponse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 1 — predictable names over short names. The variable `channel` in handleResponse required context to understand its role; `responseChannel` is self-describing on first read. Co-Authored-By: Charon --- pkg/node/controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/node/controller.go b/pkg/node/controller.go index a33bd00..f71570e 100644 --- a/pkg/node/controller.go +++ b/pkg/node/controller.go @@ -45,15 +45,15 @@ func (ctrl *Controller) handleResponse(conn *PeerConnection, msg *Message) { } ctrl.mutex.Lock() - channel, exists := ctrl.pendingRequests[msg.ReplyTo] + responseChannel, exists := ctrl.pendingRequests[msg.ReplyTo] if exists { delete(ctrl.pendingRequests, msg.ReplyTo) } ctrl.mutex.Unlock() - if exists && channel != nil { + if exists && responseChannel != nil { select { - case channel <- msg: + case responseChannel <- msg: default: // Channel full or closed }