package main
import (
"fmt"
"os"
)
func main() {
file, err := os.OpenFile("data.txt", os.O_APPEND|os.O_WRONLY, 0666)
if err != nil {
fmt.Println(err)
} else {
fmt.Fprintln(file, "nilpointer.net")
fmt.Fprintln(file, "golang")
fmt.Fprintln(file, "php")
}
file.Close()
}