Closed gernest closed 6 years ago
arg. you must have your temp dir on a different disk than your output directory or something.
I have code that writes the files to a temp file first and then renames it, to ensure the whole file gets written. it's honestly overkill,and evidently buggy.
Have you thought about just using ioutil.WriteFile
?
There is no need to be fancy, since the whole point of generating files is just overwriting them.
Yeah, I was going to go back to that. That's the way it was before.
On Wed, Sep 27, 2017, 7:37 AM Geofrey Ernest notifications@github.com wrote:
Have you thought about just using ioutil.WriteFile?
There is no need to be fancy, since the whole point of generating files is just overwriting them.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gnormal/gnorm/issues/41#issuecomment-332493413, or mute the thread https://github.com/notifications/unsubscribe-auth/ADCcyKflc3PTXt9uhmroc4-cu2MqGVQKks5smjNegaJpZM4PlbFC .
Okay.
if you want to fix it, you can search for atomic.Writefile and replace it with ioutil.writefile
Okay.
With the latest master running gnorm gen I get
Somehow this part https://github.com/gnormal/gnorm/blob/9354db9b80938db07681cb45dd19b77c24f710be/run/generate.go#L130-L132 fails