I find os.Open() return a O_RDONLY file and os.Create() return a O_RDWR but can't find a method return a APPEND file pointer.
Any help ?
The OpenFile takes a flags argument that you can use:
os.OpenFile("foo.txt", os.O_RDWR|os.O_APPEND, 0660);
Used with O_CREATE , OpenFile can also serve the same purpose as os.Create()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With