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:
parent
5cd0e96a6e
commit
e4144c5f48
1 changed files with 1 additions and 3 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue