From fda7c2019cdaa7704b4cb9d4ce56bad370bf4d11 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 14:30:15 +0100 Subject: [PATCH] ax(mining): replace prose comment with usage example on NodeService struct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 2 — comments must show HOW with real values, not restate what the type name already says. Replace the description-style comment with a concrete two-line call sequence showing construction and route registration. Co-Authored-By: Charon --- pkg/mining/node_service.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/mining/node_service.go b/pkg/mining/node_service.go index d61911a..9b76f0c 100644 --- a/pkg/mining/node_service.go +++ b/pkg/mining/node_service.go @@ -10,7 +10,8 @@ import ( "github.com/gin-gonic/gin" ) -// NodeService handles P2P node-related API endpoints. +// ns, err := NewNodeService() +// ns.SetupRoutes(router.Group("/api/v1/mining")) type NodeService struct { nodeManager *node.NodeManager peerRegistry *node.PeerRegistry