Remove unused WithTimeout (#11420)

This commit is contained in:
terencechain
2022-09-13 17:18:30 +02:00
committed by GitHub
parent 5a1d260b9a
commit 3b8a3c2276

View File

@@ -10,7 +10,6 @@ import (
"net/http"
"net/url"
"text/template"
"time"
"github.com/pkg/errors"
types "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
@@ -36,13 +35,6 @@ var errMalformedRequest = errors.New("required request data are missing")
// ClientOpt is a functional option for the Client type (http.Client wrapper)
type ClientOpt func(*Client)
// WithTimeout sets the .Timeout attribute of the wrapped http.Client.
func WithTimeout(timeout time.Duration) ClientOpt {
return func(c *Client) {
c.hc.Timeout = timeout
}
}
type observer interface {
observe(r *http.Request) error
}