From 649f57e91e707172b49e56c7ba3a67ded2a8b149 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 09:15:55 +0100 Subject: [PATCH] ax(mining): replace prose comment on StartMiner with usage example 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 signature already says. Co-Authored-By: Charon --- pkg/mining/manager.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/mining/manager.go b/pkg/mining/manager.go index b7bc0e3..cdcc0d1 100644 --- a/pkg/mining/manager.go +++ b/pkg/mining/manager.go @@ -229,8 +229,7 @@ func findAvailablePort() (int, error) { return listener.Addr().(*net.TCPAddr).Port, nil } -// StartMiner starts a new miner and saves its configuration. -// The context can be used to cancel the operation. +// miner, err := manager.StartMiner(ctx, "xmrig", &mining.Config{Algo: "rx/0"}) func (m *Manager) StartMiner(ctx context.Context, minerType string, config *Config) (Miner, error) { // Check for cancellation before acquiring lock select {