Skip to content

Commit

Permalink
clean-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
atavism committed Jun 18, 2024
1 parent d3fcdc5 commit d3b26c6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internalsdk/pro/pro.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ type ProClient interface {

// NewClient creates a new instance of ProClient
func NewClient(baseURL string, opts *webclient.Opts) ProClient {
if opts.HttpClient == nil {
opts.HttpClient = &http.Client{}
httpClient := opts.HttpClient
if httpClient == nil {
httpClient = &http.Client{}
}
client := &proClient{
userConfig: opts.UserConfig,
}
client.webclient = webclient.NewRESTClient(defaultwebclient.SendToURL(opts.HttpClient, baseURL, client.setUserHeaders(), nil))
client.webclient = webclient.NewRESTClient(defaultwebclient.SendToURL(httpClient, baseURL, client.setUserHeaders(), nil))
return client
}

Expand Down

0 comments on commit d3b26c6

Please sign in to comment.