$ account Rhymond
This is a Go library implementing the Money pattern for representing monetary values in a currency's smallest unit (e.g., cents). It provides precise arithmetic operations (addition, subtraction, multiplication, rounding), allocation and splitting of amounts without floating-point rounding errors, and formatting to human-readable strings with currency symbols and separators. The library includes a comprehensive set of ISO 4217 currency definitions, supports JSON serialization/deserialization with customizable marshal/unmarshal functions, and integrates with database/sql via Scanner and Valuer interfaces for storing monetary values in relational databases. It has no external dependencies beyond the Go standard library, making it lightweight and easy to embed. The architecture is a simple library with clear separation of concerns: a calculator for arithmetic, a formatter for display, a currency registry, and the core Money struct that composes these components.