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" "log"
"strings" "strings"
"git.kingecg.top/kingecg/goxml" "git.pyer.club/kingecg/goxml"
) )
type Animal int type Animal int

View File

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

View File

@ -9,7 +9,7 @@ import (
"log" "log"
"strings" "strings"
"git.kingecg.top/kingecg/goxml" "git.pyer.club/kingecg/goxml"
) )
type Size int 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 go 1.23.1

View File

@ -3,7 +3,7 @@ package goxml_test
import ( import (
"testing" "testing"
"git.kingecg.top/kingecg/goxml" "git.pyer.club/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 _, t, ok := strings.Cut(tag, ":"); ok { if ns, t, ok := strings.Cut(tag, ":"); ok {
finfo.xmlns, tag = "", t finfo.xmlns, tag = ns, t
} }
} }