package xml import ( "fmt" "testing" ) type Map struct { Use int A string } func TestEncode(t *testing.T) { c := codec{} fmt.Println(c.Marshal(Map{ Use: 11, A: "xxx", })) }