Merge pull request #318 from jefferai/f-fix-client-default

Fix nil dereference in API client
This commit is contained in:
Armon Dadgar 2015-06-06 13:35:48 -07:00
commit f355049ef1

View file

@ -69,6 +69,10 @@ func NewClient(c *Config) (*Client, error) {
return nil, err
}
if c.HttpClient == nil {
c.HttpClient = http.DefaultClient
}
// Make a copy of the HTTP client so we can configure it without
// affecting the original
//