omit xlmns when decode

This commit is contained in:
程广 2024-11-07 23:20:21 +08:00
parent 8ca96c74f5
commit 2c3857e50a
1 changed files with 2 additions and 2 deletions

View File

@ -119,8 +119,8 @@ func structFieldInfo(typ reflect.Type, f *reflect.StructField, inDecode bool) (*
finfo.xmlns, tag = ns, t finfo.xmlns, tag = ns, t
} }
if inDecode { if inDecode {
if ns, t, ok := strings.Cut(tag, ":"); ok { if _, t, ok := strings.Cut(tag, ":"); ok {
finfo.xmlns, tag = ns, t finfo.xmlns, tag = "", t
} }
} }