How to add / add lines to the end of the file? I have a function, but it erases, deletes the contents of the file.
func createFile(){ file, err := os.Create("demo.txt") if err != nil { return } defer file.Close() file.WriteString("My name is Mike") How to add / add lines to the end of the file? I have a function, but it erases, deletes the contents of the file.
func createFile(){ file, err := os.Create("demo.txt") if err != nil { return } defer file.Close() file.WriteString("My name is Mike") Source: https://ru.stackoverflow.com/questions/548277/
All Articles