From 4b0c01158d0ef502c7084ef12068b83e052e0ebf Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Thu, 11 May 2023 19:44:44 +0800 Subject: [PATCH] fix: panic on nil pointer --- drivers/base/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/client.go b/drivers/base/client.go index f97d53e1..2c29ce62 100644 --- a/drivers/base/client.go +++ b/drivers/base/client.go @@ -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