ax(mining): replace prose comment with usage example on parseVersion
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX Principle 2: comments show HOW with real values, not WHAT the
function does (which the signature already says).

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 14:14:41 +01:00
parent 4b6ca745f5
commit 089da5fc21
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -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))