UnmarshalText implements the encoding.TextUnmarshaler interface.
(b []byte)
| 792 | |
| 793 | // UnmarshalText implements the encoding.TextUnmarshaler interface. |
| 794 | func (d *Decimal) UnmarshalText(b []byte) error { |
| 795 | _, _, err := d.SetString(string(b)) |
| 796 | return err |
| 797 | } |
| 798 | |
| 799 | // MarshalText implements the encoding.TextMarshaler interface. |
| 800 | func (d *Decimal) MarshalText() ([]byte, error) { |