feat: fix lint error

This commit is contained in:
Kevin Franklin Kim 2023-12-14 09:45:58 +01:00
parent 5d801976ad
commit b29c1c2506
No known key found for this signature in database

View File

@ -99,7 +99,7 @@ func CircuitBreakerWithMetric(
}
func CircuitBreakerWithIsSuccessful(
isSuccessful func(err error, req *http.Request, resp *http.Response) (e error),
isSuccessful func(err error, req *http.Request, resp *http.Response) error,
copyReqBody bool,
copyRespBody bool,
) CircuitBreakerOption {
@ -133,7 +133,7 @@ func CircuitBreaker(set *CircuitBreakerSettings, opts ...CircuitBreakerOption) R
circuitBreaker := gobreaker.NewTwoStepCircuitBreaker(cbrSettings)
return func(l *zap.Logger, next Handler) Handler {
return func(r *http.Request) (resp *http.Response, err error) {
return func(r *http.Request) (resp *http.Response, err error) { //nolint:nonamedreturns
if r == nil {
return nil, errors.New("request is nil")
}