Merge pull request #318 from jefferai/f-fix-client-default
Fix nil dereference in API client
This commit is contained in:
commit
f355049ef1
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue