When I marshal float64
to an xml file:
type X struct {
Value float64 `xml:",attr,omitempty"`
}
var x X
x.Value = 1000000.04
I get value like:
<X Value="1.00000004e+06"></X>
How to change the output format, such that the full value (1000000.04) is written (and the omitempty
tag is still working)?