From 3b8a3c22764a09038507be32ab568f1652008c1c Mon Sep 17 00:00:00 2001 From: terencechain Date: Tue, 13 Sep 2022 17:18:30 +0200 Subject: [PATCH] Remove unused WithTimeout (#11420) --- api/client/builder/client.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/api/client/builder/client.go b/api/client/builder/client.go index b2d9109872..63b67905da 100644 --- a/api/client/builder/client.go +++ b/api/client/builder/client.go @@ -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 }