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).
|
||||
SetRetryCount(3).
|
||||
SetTimeout(DefaultTimeout)
|
||||
if conf.Conf.TlsInsecureSkipVerify {
|
||||
if conf.Conf != nil && conf.Conf.TlsInsecureSkipVerify {
|
||||
client = client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
|
||||
}
|
||||
return client
|
||||
|
Loading…
x
Reference in New Issue
Block a user