1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

client: remove deprecated SetCustomHTTPHeaders(), CustomHTTPHeaders()

Both of these function were added in a754d89b40.

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 a68ae4a2d9 deprecated SetCustomHTTPHeaders(),
and looks to be unused; https://grep.app/search?q=.SetCustomHTTPHeaders%28&filter[lang][0]=Go

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-07-29 13:36:20 +02:00
parent 8afb57e633
commit a6dd341ca2
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -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) {