Skip to content

Commit

Permalink
Use Godoc standard to mark deprecated Equals and StringScaled methods(#…
Browse files Browse the repository at this point in the history
  • Loading branch information
falsaffa authored Jan 15, 2024
1 parent 7b4ffbc commit 142a0cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions decimal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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()
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 142a0cf

Please sign in to comment.