From a86248086269f3ff0054926e7c8ef9186b6cd27e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 09:29:25 +0100 Subject: [PATCH] ax(mining): replace prose comment on Stop with usage example AX principle 2: comments show HOW with concrete usage, not WHAT the signature already says. The old two-line prose comment restated the function name verbatim; replaced with a defer call example. 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 3fa8158..45aafcf 100644 --- a/pkg/mining/manager.go +++ b/pkg/mining/manager.go @@ -696,8 +696,7 @@ func (m *Manager) GetMinerHashrateHistory(name string) ([]HashratePoint, error) // ShutdownTimeout is the maximum time to wait for goroutines during shutdown const ShutdownTimeout = 10 * time.Second -// Stop stops all running miners, background goroutines, and closes resources. -// Safe to call multiple times - subsequent calls are no-ops. +// defer manager.Stop() // safe in main() or test cleanup; subsequent calls are no-ops func (m *Manager) Stop() { m.stopOnce.Do(func() { // Stop all running miners first