From 089da5fc219aa778bb3a6aae79fd2453edbb0eae Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 14:14:41 +0100 Subject: [PATCH] ax(mining): replace prose comment with usage example on parseVersion AX Principle 2: comments show HOW with real values, not WHAT the function does (which the signature already says). Co-Authored-By: Charon --- pkg/mining/miner.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/mining/miner.go b/pkg/mining/miner.go index fd6fc3b..c5b8c28 100644 --- a/pkg/mining/miner.go +++ b/pkg/mining/miner.go @@ -285,7 +285,9 @@ func (b *BaseMiner) InstallFromURL(url string) error { return nil } -// parseVersion parses a version string (e.g., "6.24.0") into a slice of integers for comparison. +// a := parseVersion("6.24.0") // [6, 24, 0] +// b := parseVersion("5.0.1") // [5, 0, 1] +// if compareVersions(a, b) > 0 { /* a is newer */ } func parseVersion(v string) []int { parts := strings.Split(v, ".") intParts := make([]int, len(parts))