I would say that syncing file contents is a more advanced operation that stems from some knowledge about the persistence requirements of your application. If you have those requirements you need to be in control and should not use a convenience operations like WriteFile. Also, performance.
(I've personally only used WriteFile in tests...) //jb 2016-07-21 20:17 GMT+02:00 Manlio Perillo <manlio.peri...@gmail.com>: > What is the reason why ioutil.WriteFile does not call File.Sync? > > > Thanks > Manlio > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.