ax(mining): replace prose comment on NewService with usage example
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 <charon@lethean.io>
This commit is contained in:
parent
222edcd070
commit
bbbe474610
1 changed files with 1 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue