doanac opened this issue a year ago · 0 comments
jsonfile/jsonfile.go
Line 95 in 699d1da
I think you need an f.Sync() called before you do a Close. The write/close operations on Linux can be down async while the os.Rename is synchronous. A really inconveniently timed power failure can result in the Rename operation pointing at garbage.
f.Sync()
Close
os.Rename