summaryrefslogtreecommitdiff
path: root/client/request.go
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2021-04-16 16:15:10 +0200
committerSebastiaan van Stijn <github@gone.nl>2021-06-10 13:03:23 +0200
commitb92be7e297179ad0792643ce8c36579b5c48e109 (patch)
treee9214a96645ecc115526558f78c4bd0434b93c52 /client/request.go
parentd43bcc8974122faed16ac34cfe2b5da400948d3e (diff)
downloaddocker-b92be7e297179ad0792643ce8c36579b5c48e109.tar.gz
client: S1031: unnecessary nil check around range (gosimple)
client/request.go:245:2: S1031: unnecessary nil check around range (gosimple) if headers != nil { ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'client/request.go')
-rw-r--r--client/request.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/client/request.go b/client/request.go
index 813eac2c9e..f7aebdb2d2 100644
--- a/client/request.go
+++ b/client/request.go
@@ -242,10 +242,8 @@ func (cli *Client) addHeaders(req *http.Request, headers headers) *http.Request
req.Header.Set(k, v)
}
- if headers != nil {
- for k, v := range headers {
- req.Header[k] = v
- }
+ for k, v := range headers {
+ req.Header[k] = v
}
return req
}