mirror of
https://github.com/shopspring/decimal.git
synced 2024-11-22 12:30:49 +01:00
Use Godoc standard to mark deprecated Equals and StringScaled methods(#342)
This commit is contained in:
parent
7b4ffbcd3c
commit
142a0cf2f2
1 changed files with 4 additions and 4 deletions
|
@ -986,7 +986,7 @@ func (d Decimal) Equal(d2 Decimal) bool {
|
|||
return d.Cmp(d2) == 0
|
||||
}
|
||||
|
||||
// Equals is deprecated, please use Equal method instead
|
||||
// Deprecated: Equals is deprecated, please use Equal method instead.
|
||||
func (d Decimal) Equals(d2 Decimal) bool {
|
||||
return d.Equal(d2)
|
||||
}
|
||||
|
@ -1559,7 +1559,8 @@ func (d *Decimal) GobDecode(data []byte) error {
|
|||
}
|
||||
|
||||
// StringScaled first scales the decimal then calls .String() on it.
|
||||
// NOTE: buggy, unintuitive, and DEPRECATED! Use StringFixed instead.
|
||||
//
|
||||
// Deprecated: buggy and unintuitive. Use StringFixed instead.
|
||||
func (d Decimal) StringScaled(exp int32) string {
|
||||
return d.rescale(exp).String()
|
||||
}
|
||||
|
@ -1698,8 +1699,7 @@ func unquoteIfQuoted(value interface{}) (string, error) {
|
|||
case []byte:
|
||||
bytes = v
|
||||
default:
|
||||
return "", fmt.Errorf("could not convert value '%+v' to byte array of type '%T'",
|
||||
value, value)
|
||||
return "", fmt.Errorf("could not convert value '%+v' to byte array of type '%T'", value, value)
|
||||
}
|
||||
|
||||
// If the amount is quoted, strip the quotes
|
||||
|
|
Loading…
Reference in a new issue