Fix for ineffassign .

This commit is contained in:
178inaba 2017-04-20 21:29:10 +09:00
parent 68843f4dd0
commit d1b5f4b1fb
3 changed files with 7 additions and 3 deletions

View file

@ -128,6 +128,9 @@ func (c *Client) doAPI(ctx context.Context, method string, uri string, params in
ct = mw.FormDataContentType()
} else {
req, err = http.NewRequest(method, u.String(), nil)
if err != nil {
return err
}
}
req = req.WithContext(ctx)
req.Header.Set("Authorization", "Bearer "+c.config.AccessToken)