Skip to content

Commit

Permalink
Fix typo: afterRequst -> afterRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiyukiMineo committed Jun 10, 2015
1 parent 8066dd4 commit bfa846d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gobreaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ func (cb *CircuitBreaker) Execute(req func() (interface{}, error)) (interface{},
defer func() {
e := recover()
if e != nil {
cb.afterRequst(generation, fmt.Errorf("panic in request"))
cb.afterRequest(generation, fmt.Errorf("panic in request"))
panic(e)
}
}()

result, err := req()
cb.afterRequst(generation, err)
cb.afterRequest(generation, err)
return result, err
}

Expand All @@ -189,7 +189,7 @@ func (cb *CircuitBreaker) beforeRequest() (uint64, error) {
return generation, nil
}

func (cb *CircuitBreaker) afterRequst(before uint64, err error) {
func (cb *CircuitBreaker) afterRequest(before uint64, err error) {
cb.mutex.Lock()
defer cb.mutex.Unlock()

Expand Down

0 comments on commit bfa846d

Please sign in to comment.