From ac3c869684df661a21e17c0fafcf3aba8c1fd218 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 13:36:58 +0100 Subject: [PATCH] ax(node): replace prose comment on MessageHandler with usage example AX Principle 2: comments show HOW with real values, not WHAT the type does. Co-Authored-By: Charon --- pkg/node/transport.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/node/transport.go b/pkg/node/transport.go index 19dbf7d..9d0f538 100644 --- a/pkg/node/transport.go +++ b/pkg/node/transport.go @@ -52,7 +52,7 @@ func DefaultTransportConfig() TransportConfig { } } -// MessageHandler processes incoming messages. +// transport.OnMessage(func(conn *PeerConnection, msg *Message) { worker.HandleMessage(conn, msg) }) type MessageHandler func(conn *PeerConnection, msg *Message) // MessageDeduplicator tracks seen message IDs to prevent duplicate processing