Disclaimer: I haven’t yet used Go for currency calculation. I haven’t thought hard about this problem.
What about thinking of currency like how time.Duration is implemented? Something like this: https://play.golang.org/p/Woe8FnVz6LE
Disclaimer: I haven’t yet used Go for currency calculation. I haven’t thought hard about this problem.
What about thinking of currency like how time.Duration is implemented? Something like this: https://play.golang.org/p/Woe8FnVz6LE