keeper: fix atomix writes.#495
Conversation
|
I see now what you mean with the missing error checks in
I'm a bit annoyed at myself though, because I stared at that line for a long time and still didn't spot it. I guess go makes it very easy to forget to check errors for functions that don't return values you need. Change looks good to me! |
|
@sgotti What do you think about using a linter like https://github.com/kisielk/errcheck that promises to find all unused errors returned by functions? |
|
@nh2 Thanks for the review!
Sure, will try to add it in another PR. Just noticed that my VIM setup with ALE + gometalinter isn't working since it should have reported it... |
The current atomic write functions inside pkg/postgresql are missing some error checks and don't close the file before renaming. Improve common.WriteFileAtomic to be able to stream writes and use it.
14cff0c to
3790f9e
Compare
The current atomic write functions inside pkg/postgresql are missing some error
checks and don't close the file before renaming. Improve common.WriteFileAtomic
to be able to stream writes and use it.