You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be quite convenient to have methods on Money that panic instead of returning error. These could wrap the existing methods, with the Must prefix. For example, MustAdd would wrap Money.Add.
In my program, for example, I deal with just one currency (and am using go-money for correct handling of cents in the dollar). The ability to avoid explicit error checking, and use the result of Add, Subtract, etc. as an unary expression would be very helpful.
The text was updated successfully, but these errors were encountered:
Thanks for a great package!
It would be quite convenient to have methods on
Money
that panic instead of returning error. These could wrap the existing methods, with theMust
prefix. For example,MustAdd
would wrapMoney.Add
.In my program, for example, I deal with just one currency (and am using go-money for correct handling of cents in the dollar). The ability to avoid explicit error checking, and use the result of
Add
,Subtract
, etc. as an unary expression would be very helpful.The text was updated successfully, but these errors were encountered: