Compare commits

...

3 Commits

Author SHA1 Message Date
kingecg b766d57d4b chore: update module path to git.kingecg.top 2025-06-26 01:14:02 +08:00
kingecg 08f3632851 chore: update module path to git.kingecg.top 2025-06-25 23:02:34 +08:00
程广 2c3857e50a omit xlmns when decode 2024-11-07 23:20:21 +08:00
6 changed files with 7 additions and 7 deletions

View File

@ -9,7 +9,7 @@ import (
"log" "log"
"strings" "strings"
"git.pyer.club/kingecg/goxml" "git.kingecg.top/kingecg/goxml"
) )
type Animal int type Animal int

View File

@ -8,7 +8,7 @@ import (
"fmt" "fmt"
"os" "os"
"git.pyer.club/kingecg/goxml" "git.kingecg.top/kingecg/goxml"
) )
func ExampleMarshalIndent() { func ExampleMarshalIndent() {

View File

@ -9,7 +9,7 @@ import (
"log" "log"
"strings" "strings"
"git.pyer.club/kingecg/goxml" "git.kingecg.top/kingecg/goxml"
) )
type Size int type Size int

2
go.mod
View File

@ -1,3 +1,3 @@
module git.pyer.club/kingecg/goxml module module git.kingecg.top/kingecg/goxml
go 1.23.1 go 1.23.1

View File

@ -3,7 +3,7 @@ package goxml_test
import ( import (
"testing" "testing"
"git.pyer.club/kingecg/goxml" "git.kingecg.top/kingecg/goxml"
) )
type Person struct { type Person struct {

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