MarshalText implements the encoding.TextMarshaler interface for XML serialization.
()
| 1885 | // MarshalText implements the encoding.TextMarshaler interface for XML |
| 1886 | // serialization. |
| 1887 | func (d Decimal) MarshalText() (text []byte, err error) { |
| 1888 | return []byte(d.String()), nil |
| 1889 | } |
| 1890 | |
| 1891 | // GobEncode implements the gob.GobEncoder interface for gob serialization. |
| 1892 | func (d Decimal) GobEncode() ([]byte, error) { |