From b28d0bd12f3b40aeadb2683e2fa371ad07a670e8 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 10:46:42 +0100 Subject: [PATCH] ax(mining): replace prose comment on PerformanceMetrics with usage example AX-2 violation: comment restated the type name rather than showing a concrete usage example. Replaced with a call site example showing how to call GetStats and access the Hashrate field. Co-Authored-By: Charon --- pkg/mining/mining.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/mining/mining.go b/pkg/mining/mining.go index 7d0872c..fd9ba68 100644 --- a/pkg/mining/mining.go +++ b/pkg/mining/mining.go @@ -243,7 +243,8 @@ func isValidAlgo(algo string) bool { return true } -// PerformanceMetrics represents the performance metrics for a miner. +// metrics, err := miner.GetStats(ctx) +// if metrics.Hashrate > 0 { log.Printf("%.2f H/s", float64(metrics.Hashrate)) } type PerformanceMetrics struct { Hashrate int `json:"hashrate"` Shares int `json:"shares"`