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.
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.