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 <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:51:39 +01:00
parent 5cd0e96a6e
commit e4144c5f48
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

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