ax(mining): replace prose comment with usage example on recordSuccess
AX Principle 2: comments must show HOW with real values, not restate what the function name already says. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
9a50e472b5
commit
50548447fd
1 changed files with 1 additions and 1 deletions
|
|
@ -177,7 +177,7 @@ func (cb *CircuitBreaker) recordFailure() {
|
|||
}
|
||||
}
|
||||
|
||||
// recordSuccess records a successful request
|
||||
// cb.recordSuccess(stats) // caches result, resets failures; in HalfOpen closes the circuit after SuccessThreshold
|
||||
func (cb *CircuitBreaker) recordSuccess(result interface{}) {
|
||||
cb.mu.Lock()
|
||||
defer cb.mu.Unlock()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue