From 58b0585cd2897c62595158da978f15841ffeb97c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 5 Aug 2019 16:48:52 +0200 Subject: [PATCH] fix client.HTTPClient() not returning a copy ``` 14:26:43 client/client.go:255:9: SA4001: &*x will be simplified to x. It will not copy x. (staticcheck) 14:26:43 return &*cli.client ``` Signed-off-by: Sebastiaan van Stijn --- client/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index b63d4d6d49..0649a69cc7 100644 --- a/client/client.go +++ b/client/client.go @@ -252,7 +252,8 @@ func (cli *Client) DaemonHost() string { // HTTPClient returns a copy of the HTTP client bound to the server func (cli *Client) HTTPClient() *http.Client { - return &*cli.client + c := *cli.client + return &c } // ParseHostURL parses a url string, validates the string is a host url, and