File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -58,13 +58,13 @@ func NewDecimalFromString(src string) (result *Decimal, err error) {
58
58
// MarshalMsgpack serializes the Decimal into a MessagePack representation.
59
59
func (decNum * Decimal ) MarshalMsgpack () ([]byte , error ) {
60
60
one := decimal .NewFromInt (1 )
61
- maxSupportedDecimal := decimal .New (1 , DecimalPrecision ).Sub (one ) // 10^DecimalPrecision - 1
61
+ maxSupportedDecimal := decimal .New (1 , decimalPrecision ).Sub (one ) // 10^DecimalPrecision - 1
62
62
minSupportedDecimal := maxSupportedDecimal .Neg ().Sub (one ) // -10^DecimalPrecision - 1
63
63
if decNum .GreaterThan (maxSupportedDecimal ) {
64
- return nil , fmt .Errorf ("msgpack: decimal number is bigger than maximum supported number (10^%d - 1)" , DecimalPrecision )
64
+ return nil , fmt .Errorf ("msgpack: decimal number is bigger than maximum supported number (10^%d - 1)" , decimalPrecision )
65
65
}
66
66
if decNum .LessThan (minSupportedDecimal ) {
67
- return nil , fmt .Errorf ("msgpack: decimal number is lesser than minimum supported number (-10^%d - 1)" , DecimalPrecision )
67
+ return nil , fmt .Errorf ("msgpack: decimal number is lesser than minimum supported number (-10^%d - 1)" , decimalPrecision )
68
68
}
69
69
70
70
strBuf := decNum .String ()
You can’t perform that action at this time.
0 commit comments