From a6dd341ca2eb7082cb5ecbd1c12a486a93eb0e74 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 29 Jul 2021 13:36:20 +0200 Subject: [PATCH] client: remove deprecated SetCustomHTTPHeaders(), CustomHTTPHeaders() Both of these function were added in a754d89b4058d8508cf3cee29f6107b2f93f3001. The CustomHTTPHeaders() was not used, except for a unit test in docker/cli (this test has already been updated to not depend on this function); https://grep.app/search?q=.CustomHTTPHeaders%28%29&filter[lang][0]=Go Commit a68ae4a2d95b1ff143025a435195af0f1ab30ace deprecated SetCustomHTTPHeaders(), and looks to be unused; https://grep.app/search?q=.SetCustomHTTPHeaders%28&filter[lang][0]=Go Signed-off-by: Sebastiaan van Stijn --- client/client.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/client/client.go b/client/client.go index 809f10238d..fa511897e0 100644 --- a/client/client.go +++ b/client/client.go @@ -281,22 +281,6 @@ func ParseHostURL(host string) (*url.URL, error) { }, nil } -// CustomHTTPHeaders returns the custom http headers stored by the client. -// Deprecated: this function was unused, and will be removed in the next release. -func (cli *Client) CustomHTTPHeaders() map[string]string { - m := make(map[string]string) - for k, v := range cli.customHTTPHeaders { - m[k] = v - } - return m -} - -// SetCustomHTTPHeaders that will be set on every HTTP request made by the client. -// Deprecated: use WithHTTPHeaders when creating the client. -func (cli *Client) SetCustomHTTPHeaders(headers map[string]string) { - cli.customHTTPHeaders = headers -} - // Dialer returns a dialer for a raw stream connection, with HTTP/1.1 header, that can be used for proxying the daemon connection. // Used by `docker dial-stdio` (docker/cli#889). func (cli *Client) Dialer() func(context.Context) (net.Conn, error) {