From a56528f2eebe72ae48d1035dcd94ced36608bbf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Thu, 29 May 2025 22:36:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=BB=E8=BE=91=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E5=AF=BC=E8=87=B4NPE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- httpclient/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpclient/client.go b/httpclient/client.go index a7cf4b5..64f9978 100644 --- a/httpclient/client.go +++ b/httpclient/client.go @@ -455,7 +455,7 @@ func (hc *HttpClient) newResponse() *define.Response { // // Date : 16:04 2024/6/3 func (hc *HttpClient) getCacheResult() *define.Response { - if nil == hc.reqOption.CacheInstance { + if nil == hc.reqOption || nil == hc.reqOption.CacheInstance { log.RecordDebug("接口请求前缓存检测, 未设置缓存实例", map[string]any{}, hc.reqCfg) return nil }