Compare commits
3 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
b766d57d4b | |
|
|
08f3632851 | |
|
|
2c3857e50a |
|
|
@ -9,7 +9,7 @@ import (
|
|||
"log"
|
||||
"strings"
|
||||
|
||||
"git.pyer.club/kingecg/goxml"
|
||||
"git.kingecg.top/kingecg/goxml"
|
||||
)
|
||||
|
||||
type Animal int
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"git.pyer.club/kingecg/goxml"
|
||||
"git.kingecg.top/kingecg/goxml"
|
||||
)
|
||||
|
||||
func ExampleMarshalIndent() {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"log"
|
||||
"strings"
|
||||
|
||||
"git.pyer.club/kingecg/goxml"
|
||||
"git.kingecg.top/kingecg/goxml"
|
||||
)
|
||||
|
||||
type Size int
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,3 +1,3 @@
|
|||
module git.pyer.club/kingecg/goxml
|
||||
module module git.kingecg.top/kingecg/goxml
|
||||
|
||||
go 1.23.1
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package goxml_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"git.pyer.club/kingecg/goxml"
|
||||
"git.kingecg.top/kingecg/goxml"
|
||||
)
|
||||
|
||||
type Person struct {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue