Skip to content

Commit 7fec5c9

Browse files
authored
use UseURL to correctly parse URLs (#630)
1 parent e3fd6cf commit 7fec5c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cloud/scope/common.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ func CreateLinodeClient(config ClientConfig, opts ...Option) (LinodeClient, erro
9898
newClient.SetRootCertificate(config.RootCertificatePath)
9999
}
100100
if config.BaseUrl != "" {
101-
newClient.SetBaseURL(config.BaseUrl)
101+
_, err := newClient.UseURL(config.BaseUrl)
102+
if err != nil {
103+
return nil, fmt.Errorf("failed to set base URL: %w", err)
104+
}
102105
}
103106
newClient.SetUserAgent(fmt.Sprintf("CAPL/%s", version.GetVersion()))
104107

0 commit comments

Comments
 (0)