{"repo":"gocanto/money","free":true,"listed":false,"github":"https://github.com/gocanto/money","clone":"git clone https://github.com/gocanto/money.git","description":"A Go implementation of Martin Fowler's Money pattern","language":"Go","stars":27,"topics":["finance","go","golang","money"],"license":"MIT","category":"databases-storage","readme_excerpt":"Money A Go implementation of Martin Fowler's Money pattern, inspired by moneyphp/money. 📖 Table of Contents - Why Use a Money Library? - Installation - Requirements - Features - Packages - Quick Start - Core Concepts - Creating Money - Arithmetic Operations - Comparison Operations - Money Allocation - Formatting and Display - Parsing - Decimal Separator Handling - Aggregation - Currency Exchange - JSON Serialization - Database Support - Currency Management - Supported Currencies - Error Handling - Best Practices - Development - Differences from MoneyPHP - License - Credits - Contributing - Resources --- 🤔 Why Use a Money Library? You shouldn't represent monetary values with floats due to precision issues. This library uses integers internally to avoid floating-point arithmetic errors and provides safe money calculations. 🚀 Installation 📋 Requirements - Go 1.25.5 (per go.mod ) ✨ Features - Safe Money Arithmetic : Add, subtract, multiply without floats - Currency Support : ISO 4217 dataset + custom currencies - Formatting : Currency-aware formatting and major-unit conversion - Parsing : Parse human-entered amounts (symbols/codes, separators) - Aggregation : Sum/Min/Max/Avg via an Aggregator - Currency Exchange : Convert via an exchange.Exchange - JSON + DB Integration : json.Marshaler / Unmarshaler , sql.Scanner / driver.Valuer 📦 Packages - github.com/gocanto/money/money : Money , Manager , Aggregator , Converter - github.com/gocanto/money/currency : ISO currency data + Ma","default_branch":null,"files":null,"tree":[],"storefront":"/r/gocanto","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gocanto/money/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}