The Ledger That Cannot Lie - build a small money ledger in Go and hold it to four promises

The double-entry ledger as one picture: events in, balanced entries, balances read off. This lesson builds a small one in Go, stage by stage, and then tries to break it.
Before you start. From Every Litre Leaves One Tank and Enters Another - double-entry, normal balances and the trial balance: a ledger is accounts and entries, every transaction sums to zero, and the trial balance is the alarm. From A Book You Never Erase - the append-only ledger, reversals and derived balances: entries are only added, a mistake is fixed by a reversal, and a balance is derived from the entries. From Half a Point a Day, Gone - integer minor units, rounding and currency exponents: money is whole minor units, never floats. From The Hold That Is Not Money Yet - authorisation, capture, clearing, settlement and chargebacks: a card payment passes through a clearing account before it is cash. You need Go 1.22 or newer to run the code; you can read the lesson without it.
