From bbbe4746105b89210bcbc549435bf418a5b7f961 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 12:53:21 +0100 Subject: [PATCH] ax(mining): replace prose comment on NewService with usage example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 2 — comments show HOW with real values, not WHAT the signature already says. "NewService creates a new mining service" restates the name; the usage example teaches call-site shape. Co-Authored-By: Charon --- pkg/mining/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/mining/service.go b/pkg/mining/service.go index 7389d47..873dcd2 100644 --- a/pkg/mining/service.go +++ b/pkg/mining/service.go @@ -394,7 +394,7 @@ var wsUpgrader = websocket.Upgrader{ }, } -// NewService creates a new mining service +// svc, err := mining.NewService(mgr, ":9090", "localhost:9090", "api/v1/mining") func NewService(manager ManagerInterface, listenAddr string, displayAddr string, swaggerNamespace string) (*Service, error) { apiBasePath := "/" + strings.Trim(swaggerNamespace, "/") swaggerUIPath := apiBasePath + "/swagger"