when working with number conversions between locale currencies at the moment yu loose accuracy.
there are lots of other corner cases too shown here:
https://www.cockroachlabs.com/blog/apd-arbitrary-precision-decimal-package/
this is a nice wrapping and examples for how to deal with it.
https://github.com/erizocosmico/go-money
I think its maybe worthwhile using this, but up to you of course.
Just highlighting the issue that most libraries dont tackle.
when working with number conversions between locale currencies at the moment yu loose accuracy.
there are lots of other corner cases too shown here:
https://www.cockroachlabs.com/blog/apd-arbitrary-precision-decimal-package/
this is a nice wrapping and examples for how to deal with it.
https://github.com/erizocosmico/go-money
I think its maybe worthwhile using this, but up to you of course.
Just highlighting the issue that most libraries dont tackle.