Compare commits

..

No commits in common. "master" and "v1.0.0" have entirely different histories.

6 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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

2
go.mod
View File

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

View File

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

View File

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