From 8afb57e6336f0bcc1e3b6340c6768f17d42c73b6 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 29 Jul 2021 13:35:28 +0200 Subject: [PATCH] client: deprecate client.CustomHTTPHeaders() This function was added in a754d89b4058d8508cf3cee29f6107b2f93f3001, but not used. Currently, the only consumer of this function I could find was docker/cli, which used it in a unit-test (this test has already been updated to not depend on this function); https://grep.app/search?q=.CustomHTTPHeaders%28%29&filter[lang][0]=Go Given that commit a68ae4a2d95b1ff143025a435195af0f1ab30ace deprecated the corresponding client.SetCustomHTTPHeaders() function, and because there is no active use for this function, it should be ok to deprecate. We can include this in a patch-release (to be sure nobody else is depending on it, and (if someone is) to notify them of the deprecation. As a follow-up to this commit, I'll remove both functions. Signed-off-by: Sebastiaan van Stijn --- client/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client/client.go b/client/client.go index 21edf1fa1f..809f10238d 100644 --- a/client/client.go +++ b/client/client.go @@ -282,6 +282,7 @@ func ParseHostURL(host string) (*url.URL, error) { } // 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 {