From e4144c5f48c823dccd2fbe5608bca2dcbefc519a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 09:51:39 +0100 Subject: [PATCH] ax(mining): replace prose comment with usage example on FetchLatestGitHubVersion AX Principle 2: comments must show concrete usage, not restate the signature. Co-Authored-By: Charon --- pkg/mining/version.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/mining/version.go b/pkg/mining/version.go index 44a9555..2b47722 100644 --- a/pkg/mining/version.go +++ b/pkg/mining/version.go @@ -34,9 +34,7 @@ type GitHubRelease struct { Name string `json:"name"` } -// FetchLatestGitHubVersion fetches the latest release version from a GitHub repository. -// It takes the repository owner and name (e.g., "xmrig", "xmrig") and returns the tag name. -// Uses a circuit breaker to prevent cascading failures when GitHub API is unavailable. +// tag, err := FetchLatestGitHubVersion("xmrig", "xmrig") // "v6.21.0" func FetchLatestGitHubVersion(owner, repo string) (string, error) { cb := getGitHubCircuitBreaker()