fix panic
This commit is contained in:
parent
a934f070d7
commit
7bb527c1dc
|
@ -40,6 +40,9 @@ func (interceptor *CryptoTagInterceptor) Intercept(p any, tags ...string) (err e
|
||||||
//开始遍历标签
|
//开始遍历标签
|
||||||
for interceptor.cryptoEleQueue.Len() != 0 {
|
for interceptor.cryptoEleQueue.Len() != 0 {
|
||||||
cryptoElement, _ := interceptor.cryptoEleQueue.Remove(interceptor.cryptoEleQueue.Front()).(*CryptoElement)
|
cryptoElement, _ := interceptor.cryptoEleQueue.Remove(interceptor.cryptoEleQueue.Front()).(*CryptoElement)
|
||||||
|
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 {
|
||||||
|
|
Loading…
Reference in New Issue