Atomic writes in Go: temp file, fsync, rename

Every write to data.json in lunch-tracker goes through a temp file in the same directory, an explicit fsync, then a rename. Three lines of reasoning turn that into correctness.

August 15, 2026 · 4 min · 774 words