decimal
decimal copied to clipboard
Deprecated API
Could you use the correct format for deprecated API. According to https://github.com/golang/go/wiki/Deprecated, the deprecated API must follow this.
Plz find an example of resolve below
diff --git a/decimal.go b/decimal.go
index 4876f8c..26c1a59 100644
--- a/decimal.go
+++ b/decimal.go
@@ -681,7 +681,9 @@ func (d Decimal) Equal(d2 Decimal) bool {
return d.Cmp(d2) == 0
}
-// Equals is deprecated, please use Equal method instead
+// Equals returns whether the numbers represented by d and d2 are equal.
+//
+// Deprecated: please use Equal method instead
func (d Decimal) Equals(d2 Decimal) bool {
return d.Equal(d2)
}
@@ -1244,7 +1246,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()
}
I had no idea there is a well-known depreciation doc format. Thanks a lot for letting me know! :3