修复逻辑缺陷导致NPE问题

This commit is contained in:
白茶清欢 2025-05-29 22:36:35 +08:00
parent 7b1a36a7c3
commit a56528f2ee

View File

@ -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
}