{"id":1181,"date":"2020-01-17T16:41:27","date_gmt":"2020-01-17T16:41:27","guid":{"rendered":"https:\/\/golangbyexamples.com\/?p=1181"},"modified":"2020-01-17T16:41:31","modified_gmt":"2020-01-17T16:41:31","slug":"append-file-golang","status":"publish","type":"post","link":"https:\/\/golangbyexamples.com\/append-file-golang\/","title":{"rendered":"Append to an existing file in Go (Golang)"},"content":{"rendered":"\n

os.OpenFile()<\/strong> function of the os package can be used to open to a file in an append mode and then write to it<\/p>\n\n\n\n

Let’s see an example. In the below program:<\/p>\n\n\n\n