fix: panic on nil pointer
This commit is contained in:
parent
f97f1d532e
commit
4b0c01158d
@ -29,7 +29,7 @@ func NewRestyClient() *resty.Client {
|
|||||||
SetHeader("user-agent", UserAgent).
|
SetHeader("user-agent", UserAgent).
|
||||||
SetRetryCount(3).
|
SetRetryCount(3).
|
||||||
SetTimeout(DefaultTimeout)
|
SetTimeout(DefaultTimeout)
|
||||||
if conf.Conf.TlsInsecureSkipVerify {
|
if conf.Conf != nil && conf.Conf.TlsInsecureSkipVerify {
|
||||||
client = client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
|
client = client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
|
||||||
}
|
}
|
||||||
return client
|
return client
|
||||||
|
Loading…
x
Reference in New Issue
Block a user