From ff7acab30e68e06b8e8dd9be6ed0cc187b2fad76 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 14:23:36 +0100 Subject: [PATCH] ax(mining): replace prose comments with usage examples on writePump/readPump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RFC-025 ยง2: comments that restate what the function name already says are deleted and replaced with concrete call-site examples showing goroutine launch context and behaviour. Co-Authored-By: Charon --- pkg/mining/events.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/mining/events.go b/pkg/mining/events.go index 1a09cbb..43dfe25 100644 --- a/pkg/mining/events.go +++ b/pkg/mining/events.go @@ -301,7 +301,7 @@ func NewEvent(eventType EventType, data interface{}) Event { } } -// writePump pumps messages from the hub to the websocket connection +// go client.writePump() // started by ServeWs; writes hub events to conn, sends ping every 30s func (c *wsClient) writePump() { ticker := time.NewTicker(30 * time.Second) defer func() { @@ -341,7 +341,7 @@ func (c *wsClient) writePump() { } } -// readPump pumps messages from the websocket connection to the hub +// go client.readPump() // started by ServeWs; reads subscribe/ping messages from conn, unregisters on close func (c *wsClient) readPump() { defer func() { c.hub.unregister <- c