ax(mining): replace prose Execute comment with usage example
AX Principle 2: comments show HOW with real values, not WHAT the signature already says. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
115672cdfd
commit
588e6447bb
1 changed files with 1 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ func (cb *CircuitBreaker) State() CircuitState {
|
|||
return cb.state
|
||||
}
|
||||
|
||||
// Execute runs the given function with circuit breaker protection
|
||||
// result, err := cb.Execute(func() (interface{}, error) { return fetchStats(ctx) })
|
||||
func (cb *CircuitBreaker) Execute(fn func() (interface{}, error)) (interface{}, error) {
|
||||
// Check if we should allow this request
|
||||
if !cb.allowRequest() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue