by Robin at 20240325; nil

This commit is contained in:
Leufolium 2024-03-25 19:37:01 +08:00
parent 83927db1f3
commit 7b2d360274
1 changed files with 3 additions and 3 deletions

View File

@ -40,14 +40,14 @@ func (interceptor *CryptoTagInterceptor) Intercept(p any, tags ...string) (err e
//开始遍历标签 //开始遍历标签
for interceptor.cryptoEleQueue.Len() != 0 { for interceptor.cryptoEleQueue.Len() != 0 {
ele := interceptor.cryptoEleQueue.Remove(interceptor.cryptoEleQueue.Front()) ele := interceptor.cryptoEleQueue.Remove(interceptor.cryptoEleQueue.Front())
if ele == nil {
continue
}
cryptoElement, ok := ele.(*CryptoElement) cryptoElement, ok := ele.(*CryptoElement)
if !ok { if !ok {
logger.Error("crypto element assertion failed, element is: %v, type is: %v", ele, reflect.TypeOf(ele).String()) logger.Error("crypto element assertion failed, element is: %v, type is: %v", ele, reflect.TypeOf(ele).String())
continue continue
} }
if cryptoElement == nil {
continue
}
if cryptoElement.eleType == StructPtr { // *struct if cryptoElement.eleType == StructPtr { // *struct
if err = interceptor.parse(cryptoElement.eleValue.Interface(), tags...); err != nil { if err = interceptor.parse(cryptoElement.eleValue.Interface(), tags...); err != nil {