Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie committed Nov 12, 2024
1 parent 6256b40 commit 5d556b7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/caddyhttp/reverseproxy/reverseproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ func (h *Handler) proxyLoopIteration(r *http.Request, origReq *http.Request, w h
// ding the health status of the upstream (an error can still
// occur after the roundtrip if, for example, a response handler
// after the roundtrip returns an error)
if succ, ok := proxyErr.(roundtripSucceeded); ok {
if succ, ok := proxyErr.(roundtripSucceededError); ok {
return true, succ.error
}

Expand Down Expand Up @@ -967,10 +967,10 @@ func (h *Handler) reverseProxy(rw http.ResponseWriter, req *http.Request, origRe
res.Body.Close()
}

// wrap any route error in roundtripSucceeded so caller knows that
// wrap any route error in roundtripSucceededError so caller knows that
// the roundtrip was successful and to not retry
if routeErr != nil {
return roundtripSucceeded{routeErr}
return roundtripSucceededError{routeErr}
}

// we're done handling the response, and we don't want to
Expand Down Expand Up @@ -1447,9 +1447,9 @@ type TLSTransport interface {
EnableTLS(base *TLSConfig) error
}

// roundtripSucceeded is an error type that is returned if the
// roundtripSucceededError is an error type that is returned if the
// roundtrip succeeded, but an error occurred after-the-fact.
type roundtripSucceeded struct{ error }
type roundtripSucceededError struct{ error }

// bodyReadCloser is a reader that, upon closing, will return
// its buffer to the pool and close the underlying body reader.
Expand Down

0 comments on commit 5d556b7

Please sign in to comment.