ax(node): replace prose comment with usage example on Transport.Send
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

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 <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 07:58:01 +01:00
parent daf3c2fff9
commit 248a413dae
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -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]