ax(node): replace prose comment on NewController with usage example

AX principle 2: comments show HOW with real values, not WHAT the
signature already says.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 07:25:42 +01:00
parent 7c6645fbeb
commit b93b19fac7
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -21,7 +21,8 @@ type Controller struct {
pending map[string]chan *Message // message ID -> response channel
}
// NewController creates a new Controller instance.
// ctrl := node.NewController(nodeManager, peerRegistry, transport)
// rtt, err := ctrl.PingPeer("abc123def456")
func NewController(node *NodeManager, peers *PeerRegistry, transport *Transport) *Controller {
c := &Controller{
node: node,