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>
(cherry picked from commit b92be7e297)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-04-16 16:15:10 +02:00
parent e738a57a6d
commit 7573e32577
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -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
}