From 248a413daec2fc5cc0f4f4ef9749a2597bb06c91 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 07:58:01 +0100 Subject: [PATCH] ax(node): replace prose comment with usage example on Transport.Send AX Principle 2: comments that restate the type signature add zero information. Replaced "Send sends a message to a specific peer." with a concrete call-site example showing error handling. 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 e212b0a..d49cf66 100644 --- a/pkg/node/transport.go +++ b/pkg/node/transport.go @@ -361,7 +361,7 @@ func (t *Transport) Connect(peer *Peer) (*PeerConnection, error) { return pc, nil } -// Send sends a message to a specific peer. +// if err := transport.Send(peer.ID, msg); err != nil { return err } func (t *Transport) Send(peerID string, msg *Message) error { t.mu.RLock() pc, exists := t.conns[peerID]