ax(mining): replace prose struct comment with usage example on CircuitBreaker
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
type already says in its name.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:08:29 +01:00
parent 0bb5287f4b
commit 8e9f18ac3e
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -49,7 +49,8 @@ func DefaultCircuitBreakerConfig() CircuitBreakerConfig {
}
}
// CircuitBreaker implements the circuit breaker pattern
// cb := NewCircuitBreaker("github-api", DefaultCircuitBreakerConfig())
// result, err := cb.Execute(func() (interface{}, error) { return fetchStats(ctx) })
type CircuitBreaker struct {
name string
config CircuitBreakerConfig