When you write Go for a regulated financial platform, there's an unspoken rule everyone understands after the first incident: the code running on Friday evening must still be running on Monday morning, exactly the same way. Not "roughly the same." Not "after a restart." Exactly the same.

That changes how you write Go. You stop looking for the most elegant solution — you look for the one that won't break at 3 AM on a bank holiday. The patterns described here didn't come from tutorials or conference talks. They survived months of production, post-mortems, and code reviews with people who have very little patience for code that "should work."

Graceful shutdown — the non-negotiable pattern

First pattern, and by far the most critical. If your service can't stop cleanly, everything else is decoration.

The scenario: a deployment in progress. Kubernetes sends SIGTERM. Your service has 30 seconds to finish what it's doing. If you're in the middle of a financial transaction — a fund transfer, a reconciliation, a ledger entry — you can't just cut. You also can't take 5 minutes.