i\'m learning to create XML in Go. Here\'s my code:
type Request struct {
XMLName xml.Name `xml:\"request\"`
Action string
The members that you want to marshal have to be exported (capitalized). Try:
type point struct {
Geo string `xml:"point"`
Radius int `xml:"radius,attr"`
}
From the encoding/xml doc:
The XML element for a struct contains marshalled elements for each of the exported fields of the struct.
[..]
Because Unmarshal uses the reflect package, it can only assign to exported (upper case) fields.