chore(all): wrap all sentinel errors
- Force to use `errors.Is` instead of `==` to compare errors
This commit is contained in:
@@ -2,6 +2,7 @@ package httpproxy
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -65,5 +66,5 @@ var hopHeaders = [...]string{ //nolint:gochecknoglobals
|
||||
|
||||
// Do not follow redirect, but directly return the redirect response.
|
||||
func returnRedirect(*http.Request, []*http.Request) error {
|
||||
return http.ErrUseLastResponse
|
||||
return fmt.Errorf("%w", http.ErrUseLastResponse)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user