Remove redundant nil checks

This commit is contained in:
teresy 2018-10-10 15:28:38 -04:00 committed by Nick Craig-Wood
parent dbedf33b9f
commit 5ee1bd7ba4

View file

@ -67,10 +67,8 @@ var defaultErrorHandler ErrorHandler = func(resp *http.Response) error {
func (HTTPRequest *HTTPRequest) run(client *Client) ([]byte, error) { func (HTTPRequest *HTTPRequest) run(client *Client) ([]byte, error) {
var err error var err error
values := make(url.Values) values := make(url.Values)
if HTTPRequest.Parameters != nil { for k, v := range HTTPRequest.Parameters {
for k, v := range HTTPRequest.Parameters { values.Set(k, fmt.Sprintf("%v", v))
values.Set(k, fmt.Sprintf("%v", v))
}
} }
var req *http.Request var req *http.Request