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:
parent
7c6645fbeb
commit
b93b19fac7
1 changed files with 2 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue