From 2c3857e50ad85aaa7dfd7d88fe88f89075d02c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=B9=BF?= Date: Thu, 7 Nov 2024 23:20:21 +0800 Subject: [PATCH] omit xlmns when decode --- typeinfo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typeinfo.go b/typeinfo.go index 7ca195f..c0a5980 100644 --- a/typeinfo.go +++ b/typeinfo.go @@ -119,8 +119,8 @@ func structFieldInfo(typ reflect.Type, f *reflect.StructField, inDecode bool) (* finfo.xmlns, tag = ns, t } if inDecode { - if ns, t, ok := strings.Cut(tag, ":"); ok { - finfo.xmlns, tag = ns, t + if _, t, ok := strings.Cut(tag, ":"); ok { + finfo.xmlns, tag = "", t } }